{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/donatecasebettercasino-menu/latest.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/Jodexx/DCBetterCasinoMenuSchema/refs/heads/main/schema.json",
    "sourceSha256": "4e5e5ff4df0186b8ab9ce0ba603189fa9c587ea8fa4bdbee30472db34f8989dc",
    "fileMatch": [
      "*dcbc.yml",
      "*dcbc.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "menu": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "minimum": 9,
          "maximum": 54,
          "enum": [
            9,
            18,
            27,
            36,
            45,
            54
          ]
        }
      },
      "required": [
        "title",
        "size"
      ]
    },
    "prizes": {
      "type": "object",
      "additionalProperties": true,
      "patternProperties": {
        "^[a-zA-Z0-9_]+$": {
          "type": "string",
          "enum": [
            "random",
            "win"
          ]
        }
      }
    },
    "ticks": {
      "type": "object",
      "additionalProperties": true,
      "patternProperties": {
        "^[0-9]+(-[0-9]+)?$": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "replace_item",
                      "move_item",
                      "switch_item",
                      "donate_case",
                      "set_title",
                      "set_click",
                      "execute_group",
                      "end"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "replace_item"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "slot": {},
                        "slots": {
                          "type": "array"
                        },
                        "material": {
                          "type": "string"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "lore": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "enchanted": {
                          "type": "boolean"
                        },
                        "model_data": {
                          "type": "integer"
                        },
                        "rgb": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "move_item"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "from": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "to": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "donate_case"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "actions"
                      ],
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "switch_item"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "base_slot": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "slots": {
                          "type": "array"
                        }
                      },
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "set_title"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "title": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "execute_group"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    },
                    "then": {
                      "properties": {
                        "group": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "type": "object"
                    }
                  }
                ],
                "additionalProperties": true
              }
            },
            "gradual_slowdown": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "scale_factor": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "enabled"
              ]
            },
            "interval": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "actions"
          ]
        }
      }
    }
  },
  "additionalProperties": true,
  "required": [
    "menu",
    "prizes",
    "ticks"
  ]
}
