module.exports = {
  "metadata": { "section": "Button" },
  "definitions": {
    "ButtonNode": {
      "metadata": {
        "tsRicosNode": true,
        "examples": ["button-link", "button-action", "button-styled"],
        "features": ["BUTTON"],
        "description": "Button to trigger an action."
      },
      "properties": {
        "type": {
          "enum": ["BUTTON"],
          "metadata": {
            "description": "Node type. \n Must be `BUTTON`"
          }
        },
        "buttonData": {
          "ref": "ButtonData",
          "metadata": {
            "description": "Button details."
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "nodes": {
          "metadata": { "internal": true, "tsRicosNodesChildren": true },
          "elements": { "ref": "Never" }
        }
      }
    },
    "ButtonData": {
      "properties": {
        "type": {
          "enum": ["LINK", "ACTION"],
          "metadata": {
            "emitEnum": "ButtonData_Type",
            "description": "Button type. Supported values: <br> - `LINK`: Redirects to a webpage. <br> - `ACTION`: Performs an action."
          }
        },
        "text": {
          "type": "string",
          "metadata": {
            "description": "Button text."
          }
        }
      },
      "optionalProperties": {
        "containerData": {
          "ref": "PluginContainerData",
          "metadata": {
            "description": "Button container styling."
          }
        },
        "styles": {
          "ref": "ButtonData_Styles",
          "metadata": {
            "description": "Button styling."
          }
        },
        "link": {
          "ref": "Link",
          "metadata": {
            "description": "Button link details."
          }
        }
      }
    },
    "ButtonData_Styles": {
      "optionalProperties": {
        "border": {
          "ref": "ButtonData_Styles_Border",
          "metadata": {
            "description": "Deprecated: Use `borderWidth` and `borderRadius` instead.",
            "deprecated": true
          }
        },
        "colors": {
          "ref": "ButtonData_Styles_Colors",
          "metadata": {
            "description": "Deprecated: Use `textColor`, `borderColor` and `backgroundColor` instead.",
            "deprecated": true
          }
        },
        "borderWidth": {
          "type": "int32",
          "metadata": {
            "description": "Border width in pixels."
          }
        },
        "borderWidthHover": {
          "type": "int32",
          "metadata": {
            "description": "Deprecated: Use `borderWidth` for normal/hover states instead.",
            "deprecated": true
          }
        },
        "borderRadius": {
          "type": "int32",
          "metadata": {
            "description": "Border radius in pixels."
          }
        },
        "borderColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Border color as a hexadecimal value."
          }
        },
        "borderColorHover": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Border color as a hexadecimal value (hover state)."
          }
        },
        "textColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Text color as a hexadecimal value."
          }
        },
        "textColorHover": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Text color as a hexadecimal value (hover state)."
          }
        },
        "backgroundColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Deprecated: Use `background` instead.",
            "deprecated": true
          }
        },
        "backgroundColorHover": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Deprecated: Use `backgroundHover` instead.",
            "deprecated": true
          }
        },
        "background": {
          "ref": "Background",
          "metadata": {
            "description": "Background styling (color or gradient)."
          }
        },
        "backgroundHover": {
          "ref": "Background",
          "metadata": {
            "description": "Background styling for hover state (color or gradient)."
          }
        },
        "buttonSize": {
          "enum": [
            "MEDIUM",
            "SMALL",
            "LARGE"
          ],
          "metadata": {
            "emitEnum": "ButtonData_Styles_ButtonSize",
            "description": "Button size. Defaults to `MEDIUM`."
          }
        }
      }
    },
    "ButtonData_Styles_Colors": {
      "optionalProperties": {
        "text": {
          "type": "string",
          "metadata": {
            "description": "Deprecated: Use `textColor` in `styles` instead.",
            "deprecated": true
          }
        },
        "border": {
          "type": "string",
          "metadata": {
            "description": "Deprecated: Use `borderColor` in `styles` instead.",
            "deprecated": true
          }
        },
        "background": {
          "type": "string",
          "metadata": {
            "description": "Deprecated: Use `backgroundColor` in `styles` instead.",
            "deprecated": true
          }
        }
      }
    },
    "ButtonData_Styles_Border": {
      "optionalProperties": {
        "width": {
          "type": "int32",
          "metadata": {
            "description": "Deprecated: Use `borderWidth` in `styles` instead.",
            "deprecated": true
          }
        },
        "radius": {
          "type": "int32",
          "metadata": {
            "description": "Deprecated: Use `borderRadius` in `styles` instead",
            "deprecated": true
          }
        }
      }
    }
  }
}