{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/teaser-card.schema.json",
  "title": "Teaser Card",
  "description": "Component used to tease content",
  "type": "object",
  "properties": {
    "headline": {
      "type": "string",
      "title": "Headline",
      "description": "Headline for the teaser card",
      "format": "markdown"
    },
    "text": {
      "type": "string",
      "title": "Text",
      "description": "Body text for the teaser card",
      "format": "markdown"
    },
    "label": {
      "type": "string",
      "title": "Label",
      "description": "Label for the Teaser Card"
    },
    "layout": {
      "type": "string",
      "enum": ["stack", "row", "compact"],
      "description": "Layout for the Teaser Card",
      "default": "stack"
    },
    "centered": {
      "type": "boolean",
      "title": "Centered",
      "description": "Whether the Teaser Card is centered",
      "default": false
    },
    "url": {
      "type": "string",
      "title": "Url",
      "description": "Url that should be linked",
      "format": "uri"
    },
    "button": {
      "type": "object",
      "properties": {
        "label": {
          "title": "Label",
          "type": "string",
          "description": "Label of the button. Still A11Y relevant when the button is hidden."
        },
        "chevron": {
          "title": "Icon",
          "description": "Toggle arrow icon",
          "type": "boolean",
          "default": false
        },
        "hidden": {
          "type": "boolean",
          "title": "Display Button",
          "description": "Toggle wether you want the card to have a visible button or not",
          "default": false
        }
      },
      "required": ["label"]
    },
    "image": {
      "type": "string",
      "title": "Image",
      "description": "Image to display as cover",
      "format": "image"
    },
    "imageAlt": {
      "type": "string",
      "title": "Image Alt",
      "description": "Alternative text for the image, used for accessibility"
    },
    "imageRatio": {
      "type": "string",
      "enum": ["wide", "landscape", "square", "unset"],
      "description": "Aspect ratio of the image",
      "default": "wide"
    }
  },
  "additionalProperties": false,
  "required": ["topic", "url"]
}
