{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "alpha-blocks/button",
  "title": "Alpha Button",
  "category": "alpha-blocks",
  "icon": "button",
  "description": "A customizable button block for Alpha Blocks.",
  "version": "1.0.0",
  "textdomain": "alpha-blocks",
  "editorScript": "file:./index.js",
  "style": "alpha-block-tailwind-style",
  "attributes": {
    "blockID": {
      "type": "string"
    },
    "compiledCss": {
      "type": "string"
    },
    "buttonText": {
      "type": "string",
      "default": "Click Me",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "general",
        "inspectorComponent": "InspectorTextControl",
        "inspectorLabel": "Button Text"
      }
    },
    "buttonTextColor": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "general",
        "inspectorComponent": "InspectorColorSelect",
        "inspectorLabel": "Text Color"
      }
    },
    "buttonLinkUrl": {
      "type": "string",
      "default": "",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Link",
        "inspectorComponent": "InspectorTextControl",
        "inspectorLabel": "URL"
      }
    },
    "buttonLinkOpenInNewTab": {
      "type": "boolean",
      "default": false,
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Link",
        "inspectorComponent": "InspectorCheckbox",
        "inspectorLabel": "Open in new tab"
      }
    },
    "buttonLinkRel": {
      "type": "string",
      "default": "",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Link",
        "inspectorComponent": "InspectorTextControl",
        "inspectorLabel": "Link rel"
      }
    },
    "buttonLinkTitle": {
      "type": "string",
      "default": "",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Link",
        "inspectorComponent": "InspectorTextControl",
        "inspectorLabel": "Link Title"
      }
    },
    "buttonAnchorId": {
      "type": "string",
      "default": "",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Link",
        "inspectorComponent": "InspectorTextControl",
        "inspectorLabel": "Anchor ID"
      }
    },
    "textAlignment": {
      "type": "string",
      "default": "left",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "general",
        "inspectorComponent": "InspectorSelectButton",
        "inspectorLabel": "Text Alignment",
        "iconButton": true,
        "options": [
          {
            "label": "Left",
            "value": "left",
            "icon": "AlphaAlignStart"
          },
          {
            "label": "Center",
            "value": "center",
            "icon": "AlphaAlignCenter"
          },
          {
            "label": "Right",
            "value": "right",
            "icon": "AlphaAlignEnd"
          }
        ]
      }
    },
    "enableIcon": {
      "type": "boolean",
      "default": false,
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Icon",
        "inspectorComponent": "InspectorCheckbox",
        "inspectorLabel": "Enable Icon"
      }
    },
    "buttonIcon": {
      "type": "object",
      "default": {
        "iconName": "",
        "type": ""
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Icon",
        "inspectorComponent": "InspectorIconSelector",
        "inspectorLabel": "Select Icon",
        "conditionalRender": {
          "attribute": "enableIcon",
          "value": true
        }
      }
    },
    "iconPosition": {
      "type": "string",
      "default": "left",
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Icon",
        "inspectorComponent": "InspectorSelectButton",
        "inspectorLabel": "Icon Position",
        "options": [
          {
            "label": "Left",
            "value": "left"
          },
          {
            "label": "Right",
            "value": "right"
          }
        ],
        "conditionalRender": {
          "attribute": "enableIcon",
          "value": true
        }
      }
    },
    "iconSpacing": {
      "type": "object",
      "default": {
        "desktop": {
          "val": "10",
          "unit": "px"
        }
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "Icon",
        "inspectorComponent": "InspectorResponsiveRangeControl",
        "inspectorLabel": "Icon Spacing",
        "units": [
          "px",
          "em",
          "rem"
        ],
        "min": 0,
        "max": 100,
        "conditionalRender": {
          "attribute": "enableIcon",
          "value": true
        }
      }
    },
    "typography": {
      "type": "object",
      "default": {
        "fontWeight": "bold"
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "typography",
        "inspectorComponent": "InspectorTypographyControlTab",
        "inspectorLabel": "Typography"
      }
    },
    "maxContentWidth": {
      "type": "object",
      "default": {
        "desktop": {
          "val": "100",
          "unit": "%"
        },
        "tablet": {
          "val": "100",
          "unit": "%"
        },
        "mobile": {
          "val": "100",
          "unit": "%"
        }
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "general",
        "inspectorComponent": "InspectorResponsiveRangeControl",
        "inspectorLabel": "Max. Content Width",
        "units": [
          "px",
          "%",
          "em",
          "rem",
          "vw"
        ],
        "min": 0,
        "max": 1500
      }
    },
    "minHeight": {
      "type": "object",
      "default": {
        "desktop": {
          "val": "",
          "unit": "px"
        },
        "tablet": {
          "val": "",
          "unit": "px"
        },
        "mobile": {
          "val": "",
          "unit": "px"
        }
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "general",
        "inspectorComponent": "InspectorResponsiveRangeControl",
        "inspectorLabel": "Min Height",
        "units": [
          "px",
          "em",
          "rem",
          "vh"
        ],
        "min": 0,
        "max": 1000
      }
    },
    "margin": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "spacing",
        "inspectorComponent": "InspectorFourDimension",
        "inspectorLabel": "Margin",
        "units": [
          "px",
          "em",
          "rem",
          "%"
        ],
        "default": {
          "desktop": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          },
          "tablet": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          },
          "mobile": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          }
        }
      }
    },
    "padding": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "spacing",
        "inspectorComponent": "InspectorFourDimension",
        "inspectorLabel": "Padding",
        "units": [
          "px",
          "em",
          "rem",
          "%"
        ],
        "default": {
          "desktop": {
            "sideTop": "10",
            "sideRight": "10",
            "sideBottom": "10",
            "sideLeft": "10",
            "unit": "px"
          },
          "tablet": {
            "sideTop": "10",
            "sideRight": "10",
            "sideBottom": "10",
            "sideLeft": "10",
            "unit": "px"
          },
          "mobile": {
            "sideTop": "10",
            "sideRight": "10",
            "sideBottom": "10",
            "sideLeft": "10",
            "unit": "px"
          }
        }
      }
    },
    "border": {
      "type": "object",
      "default": {
        "width": "0px",
        "style": "solid",
        "color": "rgba(0,0,0,1)"
      },
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "spacing",
        "inspectorComponent": "InspectorBorderBox",
        "inspectorLabel": "Border"
      }
    },
    "borderRadius": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "general",
        "targetAccordionTab": "spacing",
        "inspectorComponent": "InspectorFourDimension",
        "inspectorLabel": "Border Radius",
        "units": [
          "px",
          "%"
        ],
        "default": {
          "desktop": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          },
          "tablet": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          },
          "mobile": {
            "sideTop": "0",
            "sideRight": "0",
            "sideBottom": "0",
            "sideLeft": "0",
            "unit": "px"
          }
        }
      }
    },
    "containerBackground": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "background",
        "inspectorComponent": "InspectorBackgroundControlTab",
        "inspectorLabel": "Container Background"
      }
    },
    "containerShadow": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "shadow",
        "inspectorComponent": "InspectorShadow",
        "inspectorLabel": "Container Shadow"
      }
    },
    "buttonHoverTextColor": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "onHover",
        "inspectorComponent": "InspectorColorSelect",
        "inspectorLabel": "Text Hover Color"
      }
    },
    "buttonHoverBackgroundColor": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "onHover",
        "inspectorComponent": "InspectorColorSelect",
        "inspectorLabel": "Background Hover Color"
      }
    },
    "buttonHoverBorder": {
      "type": "object",
      "default": {},
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "onHover",
        "inspectorComponent": "InspectorBorderBox",
        "inspectorLabel": "Border Hover"
      }
    },
    "buttonHoverOpacity": {
      "type": "object",
      "default": {
        "desktop": {
          "val": "100",
          "unit": ""
        }
      },
      "inspectorController": {
        "targetTab": "styles",
        "targetAccordionTab": "onHover",
        "inspectorComponent": "InspectorResponsiveRangeControl",
        "inspectorLabel": "Opacity",
        "availableUnits": [],
        "min": 0,
        "max": 100,
        "step": 1
      }
    }
  },
  "supports": {
    "align": true,
    "html": false,
    "customClassName": false
  }
}