{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 2,
  "name": "popper/form-select",
  "title": "Select",
  "description": "Dropdown select.",
  "category": "popper",
  "ancestor": [
    "popper/form"
  ],
  "textdomain": "popper",
  "attributes": {
    "id": {
      "type": "string",
      "source": "attribute",
      "selector": "select",
      "attribute": "id"
    },
    "name": {
      "type": "string",
      "source": "attribute",
      "selector": "select",
      "attribute": "name",
      "default": "select"
    },
    "label": {
      "type": "string",
      "source": "html",
      "selector": "label span:not(.required)",
      "default": "My input"
    },
    "hideLabel": {
      "type": "boolean",
      "selector": "label.hide",
      "default": false
    },
    "options": {
      "type": "array",
      "source": "query",
      "selector": "option",
      "query": {
        "value": {
          "type": "string",
          "source": "attribute",
          "attribute": "value"
        },
        "label": {
          "type": "string",
          "source": "text"
        },
        "selected": {
          "type": "boolean",
          "source": "attribute",
          "attribute": "selected"
        }
      },
      "default": [
        {
          "label": "Select an option"
        },
        {
          "value": "1",
          "label": "One"
        },
        {
          "value": "2",
          "label": "Two"
        },
        {
          "value": "3",
          "label": "Three"
        }
      ]
    },
    "multiple": {
      "type": "boolean",
      "source": "attribute",
      "selector": "select",
      "attribute": "multiple"
    },
    "required": {
      "type": "boolean",
      "source": "attribute",
      "selector": "select",
      "attribute": "required"
    },
    "disabled": {
      "type": "boolean",
      "source": "attribute",
      "selector": "select",
      "attribute": "disabled"
    },
    "readonly": {
      "type": "boolean",
      "source": "attribute",
      "selector": "select",
      "attribute": "readonly"
    },
    "showHelp": {
      "type": "boolean",
      "default": false
    },
    "help": {
      "type": "string",
      "source": "html",
      "selector": "small",
      "default": ""
    }
  },
  "editorScript": "file:./index.js",
  "render": "file:./render.php",
  "viewStyle": [
    "popper-form-input-style"
  ]
}