{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/select-field.schema.json",
  "title": "SelectField",
  "description": "SelectField buttons allow users to select a single option from a list of mutually exclusive options.",
  "type": "object",
  "properties": {
    "label": {
      "title": "Label",
      "description": "The label for the element",
      "type": "string",
      "examples": [
        "Est dolore a debitis"
      ]
    },
    "value": {
      "title": "Value",
      "description": "The value of the input element, used when submitting an HTML form",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "description": "The name of the input element, used when submitting an HTML form",
      "type": "string"
    },
    "disabled": {
      "title": "Disabled",
      "description": "Whether the input is disabled",
      "type": "boolean",
      "default": false
    },
    "options": {
      "title": "Options",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "disabled": {
            "title": "Disabled",
            "description": "Whether the input is disabled",
            "type": "boolean",
            "default": false
          }
        },
        "additionalProperties": false,
        "required": [
          "label"
        ]
      }
    },
    "hideLabel": {
      "title": "Hide Label",
      "description": "Hide label visually",
      "type": "boolean"
    },
    "invalid": {
      "title": "Invalid",
      "description": "Wheter the input is invalid",
      "type": "boolean"
    },
    "invalidMessage": {
      "title": "Invalid message",
      "description": "Message to show if the input is invalid",
      "type": "string"
    },
    "hint": {
      "title": "Hint message",
      "description": "Help text that gives more context about what a user needs to input",
      "type": "string"
    },
    "icon": {
      "type": "string",
      "title": "Icon identifier",
      "default": "chevron-down"
    },
    "className": {
      "title": "Class",
      "description": "Additional css classes attached to the input element",
      "type": "string"
    }
  },
  "required": [
    "label"
  ],
  "additionalProperties": false
}