{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/tab-data-for-a-linutil/latest.json",
  "title": "tab data",
  "description": "Tab data",
  "x-lintel": {
    "source": "https://www.schemastore.org/linutil-tab-data.json",
    "sourceSha256": "fe0babf2cc18419d63b27be242df6ff8ea0e108b6a18adfe30634ef8f48f7752",
    "fileMatch": [
      "**/*linutil*/**/tab_data.toml"
    ],
    "parsers": [
      "toml"
    ]
  },
  "type": "object",
  "properties": {
    "name": {
      "$ref": "#/$defs/string-property",
      "title": "name",
      "description": "The name of a tab"
    },
    "multi_selectable": {
      "title": "multi_selectable",
      "description": "Whether the tab entries should be able to multi select",
      "type": "boolean"
    },
    "data": {
      "title": "data",
      "description": "The data of a tab",
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "title": "data entry",
        "description": "The data entry of a tab",
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/$defs/string-property",
            "title": "name",
            "description": "The name of a tab entry"
          },
          "script": {
            "$ref": "#/$defs/string-property",
            "title": "script",
            "description": "The script run of a tab entry"
          },
          "description": {
            "$ref": "#/$defs/string-property",
            "title": "description",
            "description": "Description of the tab entry"
          },
          "task_list": {
            "$ref": "#/$defs/string-property",
            "title": "task_list",
            "description": "The task list of a tab entry"
          },
          "preconditions": {
            "title": "preconditions",
            "description": "Preconditions of a tab entry",
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "title": "precondition entry",
              "description": "The precondition entry of a tab entry",
              "type": "object",
              "properties": {
                "matches": {
                  "title": "matches",
                  "description": "Whether to require the condition to match or not for a precondition entry",
                  "type": "boolean"
                },
                "data": {
                  "title": "data",
                  "description": "The data of a tab precondition entry",
                  "type": "object",
                  "properties": {
                    "environment": {
                      "$ref": "#/$defs/string-property",
                      "title": "environment",
                      "description": "The environment variable of a data"
                    },
                    "command_exists": {
                      "title": "command_exists",
                      "description": "The command pre-condition of a data",
                      "type": "null"
                    },
                    "file": {
                      "$ref": "#/$defs/string-property",
                      "title": "file",
                      "description": "The file pre-condition of a data"
                    }
                  },
                  "additionalProperties": false
                },
                "values": {
                  "title": "values",
                  "description": "The values of a tab precondition entry",
                  "type": "array",
                  "minItems": 1,
                  "uniqueItems": true,
                  "items": {
                    "title": "entry",
                    "description": "The entry of values",
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "entries": {
            "title": "entries",
            "description": "The entries of a tab entry",
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "title": "entry",
              "description": "The entry",
              "type": "object",
              "properties": {
                "name": {
                  "$ref": "#/$defs/string-property",
                  "title": "name",
                  "description": "The name of a tab entry"
                },
                "script": {
                  "$ref": "#/$defs/string-property",
                  "title": "script",
                  "description": "The script run of a tab entry"
                },
                "matches": {
                  "title": "matches",
                  "description": "Whether to require the condition to match or not for an entry",
                  "type": "boolean"
                },
                "description": {
                  "$ref": "#/$defs/string-property",
                  "title": "description",
                  "description": "Description of the tab entry"
                },
                "task_list": {
                  "$ref": "#/$defs/string-property",
                  "title": "task_list",
                  "description": "The task list of a tab entry"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "name",
    "data"
  ],
  "id": "https://json.schemastore.org/linutil-tab-data.json",
  "additionalProperties": false,
  "$defs": {
    "string-property": {
      "type": "string",
      "minLength": 1,
      "pattern": "[^ ]"
    }
  }
}
