{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/stats.schema.json",
  "title": "Stats",
  "description": "Component used to display stats with a number upcounter",
  "type": "object",
  "properties": {
    "align": {
      "title": "Align",
      "description": "Alignment of the stats content",
      "type": "string",
      "enum": [
        "left",
        "center"
      ],
      "default": "center"
    },
    "stat": {
      "title": "Stats",
      "type": "array",
      "description": "The stats to display with a number upcounter",
      "items": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "$id": "http://schema.mydesignsystem.com/stat.schema.json",
        "title": "Stat",
        "description": "Stat entry of Stats component",
        "type": "object",
        "properties": {
          "number": {
            "title": "Number",
            "description": "The number of the stat",
            "type": "string",
            "examples": [
              "1",
              "5x",
              "2",
              "40%",
              "bis zu 100"
            ]
          },
          "description": {
            "title": "Description",
            "description": "Optional description of the stat",
            "type": "string",
            "format": "markdown"
          },
          "title": {
            "title": "Title",
            "description": "Title of the stat",
            "type": "string",
            "format": "markdown",
            "examples": [
              "Stat 1",
              "Stat 2",
              "Stat 3",
              "Stat 4"
            ]
          },
          "icon": {
            "title": "Icon",
            "description": "Optional icon of the stat",
            "type": "string",
            "format": "icon",
            "examples": [
              "person",
              "home",
              "map"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "number",
          "label"
        ],
        "examples": [
          {
            "number": 1,
            "label": "Stat 1"
          },
          {
            "number": 2,
            "label": "Stat 2"
          },
          {
            "number": 3,
            "label": "Stat 3"
          },
          {
            "value": 4,
            "label": "Stat 4"
          }
        ]
      },
      "minItems": 1,
      "maxItems": 4
    }
  },
  "additionalProperties": false,
  "required": [
    "stats"
  ]
}