{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/button-group.schema.json",
  "title": "Button Group",
  "type": "object",
  "properties": {
    "buttons": {
      "title": "Buttons",
      "description": "Buttons of the Button Group",
      "type": "array",
      "items": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "$id": "http://schema.mydesignsystem.com/button.schema.json",
        "title": "Button",
        "description": "Component used for user interaction",
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Text content to display inside the button",
            "examples": [
              "Book a meeting"
            ]
          },
          "url": {
            "type": "string",
            "title": "URL",
            "description": "The URL to link to when the button is clicked",
            "format": "uri"
          },
          "variant": {
            "type": "string",
            "title": "Variant",
            "description": "Variant of button to be used",
            "enum": [
              "primary",
              "secondary",
              "tertiary"
            ],
            "default": "secondary"
          },
          "icon": {
            "type": "string",
            "format": "icon",
            "title": "Icon",
            "description": "Choose an icon"
          },
          "size": {
            "type": "string",
            "title": "Size",
            "description": "Size of button to use",
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "default": "medium"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled?",
            "description": "Whether the button should be disabled",
            "default": false
          },
          "type": {
            "type": "string",
            "title": "Button Type",
            "enum": [
              "button",
              "submit",
              "reset"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "label"
        ]
      }
    },
    "colorNeutral": {
      "title": "Color Neutral",
      "description": "Set the buttons to a color neutral variant",
      "default": false,
      "type": "boolean"
    },
    "size": {
      "type": "string",
      "title": "Size",
      "description": "Size of button to use",
      "enum": [
        "small",
        "medium",
        "large"
      ],
      "default": "medium"
    },
    "arrangement": {
      "title": "Button arrangement",
      "description": "Vertical arrangement of the buttons",
      "type": "string",
      "enum": [
        "left",
        "center",
        "right",
        "space-between",
        "grow"
      ],
      "default": "left"
    },
    "className": {
      "title": "Additional Classes",
      "description": "Add additional css classes that should be applied to the button",
      "type": "string"
    }
  },
  "additionalProperties": false
}