{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "tip",
  "description": "Bahşiş. `allow_custom` ise “Diğer” düğmesi tutar girişi açar.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "title",
    "options"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "tip"
      ]
    },
    "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"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
    },
    "options": {
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "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"
          },
          "amount": {
            "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"
          }
        },
        "required": [
          "value",
          "amount"
        ]
      }
    },
    "allow_custom": {
      "type": "boolean",
      "description": "“Diğer” tutar girişi. `custom` değeri bu eyleme AYRILMIŞTIR: seçenek değeri olamaz (`/options/i/value: not-allowed`); `allow_custom` kapalıyken `select {value:\"custom\"}` reddedilir."
    },
    "selected": {
      "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": "options[].value | custom",
        "amount": "value=custom ise girilen tutar"
      }
    }
  ]
}
