{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "stepper_toggles",
  "description": "Adet + anahtarlar.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "stepper_toggles"
      ]
    },
    "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"
      ]
    },
    "steppers": {
      "type": "array",
      "minItems": 0,
      "maxItems": 6,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "description": "form alanı/grup kimliği; `values` anahtarı"
          },
          "label": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "value": {
            "type": "integer",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "min": {
            "type": "integer",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "max": {
            "type": "integer",
            "minimum": -1000000,
            "maximum": 1000000
          }
        },
        "required": [
          "id",
          "label",
          "value"
        ]
      }
    },
    "toggles": {
      "type": "array",
      "minItems": 0,
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "description": "form alanı/grup kimliği; `values` anahtarı"
          },
          "label": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label",
          "value"
        ]
      }
    },
    "actions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action_id": {
            "type": "string",
            "pattern": "^[a-z0-9_-]{1,64}$",
            "description": "düğme eylem kimliği; `values.action_id` olarak geri gelir"
          },
          "label": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1
          },
          "style": {
            "type": "string",
            "enum": [
              "primary",
              "secondary",
              "danger"
            ]
          },
          "disabled": {
            "type": "boolean"
          }
        },
        "required": [
          "action_id",
          "label"
        ],
        "description": "basılınca `inki_component_action{action:\"submit\", values:{action_id}}`"
      }
    }
  },
  "x-inki-eylem": [
    {
      "action": "change",
      "values": {
        "steppers[].id | toggles[].id": "yeni değer (sayı | boolean)"
      }
    },
    {
      "action": "submit",
      "values": {
        "action_id": "actions[].action_id"
      }
    }
  ]
}
