{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/image-story.schema.json",
  "title": "Image Story",
  "description": "Image story component for displaying an image alongside text content with customizable layout and buttons.",
  "type": "object",
  "properties": {
    "headline": {
      "title": "Module Headline",
      "description": "Headline for the module element",
      "type": "string",
      "format": "markdown",
      "examples": [
        "Headline"
      ]
    },
    "largeHeadline": {
      "type": "boolean",
      "title": "Large Headline",
      "description": "Make the headline larger",
      "default": false
    },
    "sub": {
      "title": "Module Subheadline",
      "description": "Subheadline below the module headline",
      "type": "string",
      "format": "markdown",
      "examples": [
        "Subheadline"
      ]
    },
    "text": {
      "title": "Module Text",
      "description": "Info text for the module element",
      "type": "string",
      "format": "markdown"
    },
    "layout": {
      "type": "string",
      "title": "Layout",
      "description": "Choose the layout for the component",
      "enum": [
        "textLeft",
        "imageLeft"
      ],
      "default": "imageLeft"
    },
    "padding": {
      "type": "boolean",
      "title": "Padding",
      "default": false,
      "description": "Give the component padding"
    },
    "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"
        ]
      }
    },
    "image": {
      "title": "Image",
      "description": "Image displayed alongside the text content",
      "type": "object",
      "properties": {
        "src": {
          "title": "Image source",
          "description": "Image source to use",
          "type": "string",
          "format": "image"
        },
        "aspectRatio": {
          "type": "string",
          "title": "Aspect Ratio",
          "description": "The aspect ratio of the image",
          "enum": [
            "unset",
            "square",
            "wide",
            "landscape"
          ],
          "default": "unset"
        },
        "alt": {
          "title": "Alt text",
          "description": "Image description",
          "type": "string"
        },
        "vAlign": {
          "title": "Image vertical alignment",
          "description": "Select a vertical alignment for the image",
          "type": "string",
          "enum": [
            "center",
            "top",
            "bottom"
          ],
          "default": "top"
        }
      },
      "additionalProperties": false
    },
    "textAlign": {
      "title": "Text Alignment",
      "description": "Choose the alginment of the text",
      "enum": [
        "left",
        "center"
      ],
      "type": "string",
      "default": "left"
    }
  },
  "additionalProperties": false
}