{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "tabbed_menu",
  "description": "Sekmeli menü. Sekme geçişi yereldir (içerik bileşende); öğe seçimi `select` gönderir.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "tabs"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "tabbed_menu"
      ]
    },
    "version": {
      "type": "integer",
      "enum": [
        1
      ]
    },
    "tone": {
      "type": "string",
      "enum": [
        "neutral",
        "success",
        "warning",
        "danger",
        "brand"
      ]
    },
    "brand_color": {
      "type": "string",
      "enum": [
        "mavi",
        "turuncu",
        "mor",
        "pembe",
        "altin",
        "yesil",
        "turkuaz"
      ]
    },
    "tabs": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
            "description": "seçenek/öğe değeri; istemci bunu `inki_component_action.values` içinde geri gönderir"
          },
          "label": {
            "type": "string",
            "maxLength": 30,
            "minLength": 1
          },
          "items": {
            "type": "array",
            "minItems": 0,
            "maxItems": 30,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "value": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
                  "description": "seçenek/öğe değeri; istemci bunu `inki_component_action.values` içinde geri gönderir"
                },
                "name": {
                  "type": "string",
                  "maxLength": 80,
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "maxLength": 160
                },
                "price": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1000000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "TRY",
                        "INK",
                        "USD",
                        "EUR"
                      ]
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "description": "tutar; biçimlendirmeyi (₺, ondalık ayracı) istemci yapar"
                },
                "image": {
                  "type": "string",
                  "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
                  "x-inki-medya": "photo",
                  "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
                },
                "brand_color": {
                  "type": "string",
                  "enum": [
                    "mavi",
                    "turuncu",
                    "mor",
                    "pembe",
                    "altin",
                    "yesil",
                    "turkuaz"
                  ]
                }
              },
              "required": [
                "value",
                "name"
              ]
            }
          }
        },
        "required": [
          "value",
          "label",
          "items"
        ]
      }
    },
    "active_tab": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
      "description": "seçenek/öğe değeri; istemci bunu `inki_component_action.values` içinde geri gönderir"
    }
  },
  "x-inki-eylem": [
    {
      "action": "select",
      "values": {
        "value": "tabs[].items[].value"
      }
    }
  ]
}
