{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "$schema": {
            "type": "string",
            "description": "URL to a schema file"
        },
        "basePath": {
            "type": "string",
            "description": "Path to the Framework Directory."
        },
        "dependencyFiles": {
            "type": "array",
            "description": "Theme independent files.",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Path to the file with the project directory as base path.",
                        "minLength": 1
                    },
                    "type": {
                        "type": "string",
                        "enum": ["Stylesheet", "JavaScript", "EsModule"],
                        "description": "Type of file. Stylesheet, JavaScript and EsModule are supported."
                    },
                    "description": {
                        "type": "string",
                        "description": "A long description of this file."
                    }
                },
                "required": ["name", "type"]
            }
        },
        "activeTheme": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the Theme which is active while loading the Application."
        },
        "themes": {
            "description": "List of Themes of this Application.",
            "type": "object",
            "additionalProperties": {
                "description": "Definition of the Theme.",
                "type": "object",
                "properties": {
                    "resources": {
                        "description": "References to Resources of this Theme.",
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "description": "Path to the file with the project directory as base path.",
                                    "minLength": 1
                                },
                                "type": {
                                    "type": "string",
                                    "enum": ["Stylesheet", "ThemedValues"],
                                    "description": "Type of the control asset."
                                },
                                "description": {
                                    "type": "string",
                                    "description": "A long description of this file."
                                }
                            }
                        }
                    },
                    "replacesThemeForControls": {
                        "type": "array",
                        "description": "Project only: Do not load theme files (.theme and .css) for this controls",
                        "items": {
                            "type": "string"
                        }
                    },
                    "replacesThemeForPackageComponents": {
                        "type": "array",
                        "description": "Project only: Do not load .css files for these package components (as 'packageId/componentName'). \nFor example 'Beckhoff.TwinCAT.HMI.Controls/ContentTabs' or for all global resources 'Beckhoff.TwinCAT.HMI.ResponsiveNavigation'",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "locale": {
            "type": "string",
            "description": "Deprecated and unused."
        },
        "scaleMode": {
            "type": "string",
            "enum": ["None", "ScaleToFill", "ScaleToFit", "ScaleToFitWidth", "ScaleToFitHeight"],
            "description": "Scalemode of the full Application."
        },
        "startupView": {
            "type": "string",
            "description": "Name of the View which is active while loading the Application."
        },
        "loginPage": {
            "type": "string",
            "description": "Path to a custom login page."
        },
        "tcHmiServer": {
            "description": "Configuration of the Server Communication.",
            "type": "object",
            "properties": {
                "websocketIntervalTime": {
                    "type": "integer",
                    "description": "Interval used for server request or symbols if no override is specified."
                },
                "websocketTimeout": {
                    "type": "integer",
                    "description": "Timeout used for server requests or symbols if no override is specified."
                },
                "websocketSystemTimeout": {
                    "type": "integer",
                    "description": "Timeout used for internal server communication. Normally it is not necessary to change this setting."
                },
                "websocketSubscriptionMode": {
                    "type": "string",
                    "enum": ["Change", "Poll"],
                    "description": "Subscription mode used for symbol related subscriptions if no override is specified."
                }
            }
        },
        "packages": {
            "description": "List of all available packages.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Package Id."
                    },
                    "basePath": {
                        "type": "string",
                        "description": "Path to the package root directory."
                    }
                }
            }
        },
        "userControls": {
            "description": "List of all available Usercontrols.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Path to the Usercontrol main file."
                    }
                },
                "required": ["url"]
            }
        },
        "content": {
            "description": "List of all available content files.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Path to the content file."
                    },
                    "preload": {
                        "type": "boolean",
                        "description": "Defines if the file should be loaded and compiled during initialization to accelerate later usage."
                    },
                    "keepAlive": {
                        "type": "boolean",
                        "description": "Defines if the compile result should be cached after first usage to accelerate later usage."
                    },
                    "loadSync": {
                        "type": "boolean",
                        "description": "Defines if the content should be loaded synchronous.",
                        "default": false
                    },
                    "preloadBindings": {
                        "type": "boolean",
                        "description": "Defines if bindings on controls within this file should be preloaded before its content is displayed to have proper values when the content is displayed.",
                        "default": false
                    }
                },
                "required": ["url", "preload"]
            }
        },
        "views": {
            "description": "List of all available view files.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Path to the view file."
                    },
                    "preload": {
                        "type": "boolean",
                        "description": "Defines if the file should be loaded and compiled during initialization to accelerate later usage."
                    },
                    "keepAlive": {
                        "type": "boolean",
                        "description": "Defines if the compile result should be cached after first usage to accelerate later usage."
                    },
                    "preloadBindings": {
                        "type": "boolean",
                        "description": "Defines if bindings on controls within this file should be preloaded before its content is displayed to have proper values when the content is displayed.",
                        "default": false
                    }
                },
                "required": ["url", "preload"]
            }
        },
        "userFunctions": {
            "description": "List of all available user function files.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Path to the user function js file."
                    }
                }
            }
        },
        "symbols": {
            "type": "object",
            "description": "Definition of all project based symbols.",
            "properties": {
                "internal": {
                    "type": "object",
                    "description": "Definition of all project based internal symbols (available via %i%symbolname%/i%). Key is the symbol name.",
                    "additionalProperties": {
                        "type": "object",
                        "description": "Definition of the internal symbol with this name.",
                        "properties": {
                            "value": {
                                "description": "Value for this internal symbol."
                            },
                            "persist": {
                                "type": "boolean",
                                "description": "The change of value is saved in the client and available after reload. Defaults to false if not provided.",
                                "default": false
                            },
                            "readonly": {
                                "type": "boolean",
                                "description": "The symbol can not be changed. Defaults to false if not provided.",
                                "default": false
                            },
                            "type": {
                                "type": "string",
                                "minLength": 6,
                                "pattern": "^tchmi:",
                                "description": "Information about the expected type as a tchmi reference name."
                            }
                        },
                        "required": ["type"]
                    }
                },
                "themedResources": {
                    "type": "object",
                    "description": "Definition of all project based themedResource symbols (available via %tr%symbolname%/tr%). Key is the symbol name.",
                    "additionalProperties": {
                        "type": "object",
                        "description": "Definition of the themedResource symbol with this name.",
                        "properties": {
                            "type": {
                                "type": "string",
                                "minLength": 6,
                                "pattern": "^tchmi:",
                                "description": "Information about the expected type as a tchmi reference name. \nThe type of the parameter gives the tchmi creator a hint to use a custom editor."
                            },
                            "description": {
                                "type": "string",
                                "description": "A description of the themed resource."
                            },
                            "values": {
                                "type": "object",
                                "description": "A map containing a value for each theme. Key is the themename.",
                                "additionalProperties": {
                                    "description": "Value for each resource name"
                                }
                            }
                        },
                        "required": ["type"]
                    }
                }
            },
            "required": ["internal"]
        },
        "trigger": {
            "description": "Definition of global Triggers.",
            "type": "array",
            "items": {
                "$ref": "#/definitions/Trigger"
            }
        },
        "actionTemplates": {
            "description": "Definition of all available actionTemplates.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Name of the Action Template.",
                        "type": "string"
                    },
                    "category": {
                        "type": "string"
                    },
                    "actions": {
                        "type": "array"
                    },
                    "parameters": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "structDataType": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "languages": {
            "description": "List of all available localization files for the project strings (LocalizedText symbols).",
            "type": "object",
            "additionalProperties": {
                "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
                "oneOf": [
                    {
                        "type": "string",
                        "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
                        }
                    }
                ]
            }
        },
        "languageFallback": {
            "type": "string",
            "description": "Definition of Language and Region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US')."
        },
        "languagesForFramework": {
            "type": "object",
            "description": "Project level overrides for framework core localization files.",
            "additionalProperties": {
                "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
                "oneOf": [
                    {
                        "type": "string",
                        "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
                        }
                    }
                ]
            }
        },
        "languagesForControls": {
            "type": "object",
            "description": "Project level overrides for framework control localization files.",
            "additionalProperties": {
                "type": "object",
                "languages": {
                    "description": "List of all available localization files of the related control.",
                    "type": "object",
                    "additionalProperties": {
                        "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
                        "oneOf": [
                            {
                                "type": "string",
                                "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
                                }
                            }
                        ]
                    }
                }
            }
        },
        "languagesForFunctions": {
            "type": "object",
            "description": "Project level overrides for framework function localization files.",
            "additionalProperties": {
                "type": "object",
                "languages": {
                    "description": "List of all available localization files of the related function.",
                    "type": "object",
                    "additionalProperties": {
                        "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
                        "oneOf": [
                            {
                                "type": "string",
                                "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
                                }
                            }
                        ]
                    }
                }
            }
        },
        "keyboardLayouts": {
            "description": "List of available keyboard layouts in project.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Path to the keyboard layout."
                    }
                },
                "required": ["url"]
            }
        },
        "disableLoadingOptimization": {
            "type": "boolean",
            "description": "Disable various loading optimizations"
        },
        "tcspeech": {
            "type": "object",
            "description": "Configuration for TcSpeech Integration.",
            "properties": {
                "domain": {
                    "type": "string",
                    "description": "Name of the TcSpeech extension on the server."
                },
                "enableSpeaker": {
                    "type": "boolean",
                    "description": "Our speaker should be used."
                },
                "enableMicrophone": {
                    "type": "boolean",
                    "description": "Our microphone should be used."
                },
                "defaultVolume": {
                    "type": "number",
                    "description": "Default audio volume",
                    "default": 1,
                    "minimum": 0,
                    "maximum": 1
                },
                "confidenceThreshold": {
                    "type": "number",
                    "description": "Ignore detected speech commands with a lower relative measure of the certainty of correct recognition of a phrase. The value is from 0.0 to 1.0, for low to high confidence, respectively. ",
                    "default": 0.2,
                    "minimum": 0,
                    "maximum": 1
                }
            }
        },
        "creatorSettings": {
            "description": "Definition of engineering settings.",
            "type": "object",
            "properties": {
                "viewport": {
                    "description": "Definition of the viewport emulation.",
                    "type": "object",
                    "properties": {
                        "defaultWidth": {
                            "type": "number",
                            "description": "Width as a Pixel Number."
                        },
                        "defaultHeight": {
                            "type": "number",
                            "description": "Height as a Pixel Number."
                        }
                    },
                    "required": ["defaultHeight", "defaultWidth"]
                }
            },
            "required": ["viewport"]
        },
        "binding": {
            "description": "Binding settings",
            "type": "object",
            "properties": {
                "symbolError": {
                    "description": "Determines how a binding will handle symbol related errors.\nPossible values:\n- Reset: The binding will force the control attribute to be reset to its default value in case of an error.\n- Ignore: The binding will ignore the error and not force the control attribute to be reset to its default value.",
                    "type": "string",
                    "enum": ["Ignore", "Reset"],
                    "default": "Ignore"
                }
            },
            "additionalProperties": false,
            "required": ["symbolError"]
        },
        "systemKeyboard": {
            "description": "Defines the system keyboard",
            "type": "object",
            "properties": {
                "providerName": {
                    "type": "string",
                    "default": "",
                    "description": "Name of the keyboard provider or empty string to disable system keyboard. \nDefaults to empty string."
                },
                "projectKeyboardMapping": {
                    "type": "object",
                    "description": "Definition of the keyboard mappings. Key is the locale.",
                    "additionalProperties": {
                        "type": "object",
                        "description": "Mapping from input mode string to project based keyboard layout. Key is the input mode.",
                        "properties": {
                            "text": {
                                "type": "string",
                                "description": "Keyboard layout path for texts and unknown input elements. \nCould be the empty string. Will fall back to 'text' of fallback language."
                            },
                            "decimal": {
                                "type": "string",
                                "description": "Keyboard layout path for decimal input elements (potential fractional input). \nCould be the empty string. Will fall back to 'decimal' of fallback language, \n'text' keyboard file of this language or 'text' of fallback language."
                            },
                            "numeric": {
                                "type": "string",
                                "description": "Keyboard layout path for numeric input elements (non-fractional input). \nCould be empty. Will fall back to 'decimal' of this language, \n'numeric' / 'decimal' of fallback language, \n'text' keyboard file of this language or 'text' of fallback language."
                            }
                        },
                        "required": ["decimal", "numeric", "text"],
                        "additionalProperties": {
                            "type": "string",
                            "description": "Configured project based keyboard path for some text controls or input controls. \nCould be the empty string. Will fall back to the same input mode of fallback language, \n'text' keyboard file of this language or 'text' of fallback language."
                        }
                    }
                },
                "layout": {
                    "type": "object",
                    "description": "Layout of the system keyboard.",
                    "properties": {
                        "height": {
                            "type": "number",
                            "description": "Pixel height of the system keyboard. \nIf empty the defined height of the keyboard layout will be used."
                        }
                    }
                }
            },
            "required": ["providerName"],
            "additionalProperties": false,
            "examples": [
                {
                    "providerName": ""
                },
                {
                    "providerName": "Beckhoff.TcHmiKeyboard",
                    "projectKeyboardMapping": {
                        "de": {
                            "text": "KeyboardLayouts/German - indirect basic.keyboard.json",
                            "decimal": "KeyboardLayouts/Numpad (plusminus) - indirect.keyboard.json",
                            "numeric": "KeyboardLayouts/Numpad (plusminus) - indirect.keyboard.json"
                        },
                        "en": {
                            "text": "KeyboardLayouts/US - indirect compact.keyboard.json",
                            "decimal": "KeyboardLayouts/Numpad (plusminus) - indirect.keyboard.json",
                            "numeric": "KeyboardLayouts/Numpad (plusminus) - indirect.keyboard.json"
                        }
                    }
                },
                {
                    "providerName": "Beckhoff.TcHmiKeyboard",
                    "projectKeyboardMapping": {
                        "de": {
                            "text": "KeyboardLayouts/German - indirect basic.keyboard.json",
                            "decimal": "",
                            "numeric": ""
                        },
                        "en": {
                            "text": "KeyboardLayouts/US - indirect compact.keyboard.json",
                            "decimal": "",
                            "numeric": ""
                        }
                    }
                }
            ]
        },
        "systemPopups": {
            "description": "Defines the system popups",
            "type": "object",
            "properties": {
                "providerName": {
                    "type": "string",
                    "description": "Name of the popup provider."
                }
            },
            "required": ["providerName"],
            "additionalProperties": false
        }
    },
    "additionalProperties": false,
    "required": [
        "basePath",
        "scaleMode",
        "startupView",
        "tcHmiServer",
        "userControls",
        "content",
        "views",
        "userFunctions",
        "symbols",
        "trigger",
        "actionTemplates",
        "languages",
        "creatorSettings",
        "binding",
        "systemPopups"
    ],
    "definitions": {
        "Trigger": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "action": {
                    "anyOf": [
                        {
                            "title": "Condition",
                            "type": "object",
                            "description": "IF .. THEN ..ELSE - style condition",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["Condition"]
                                },
                                "parts": {
                                    "type": "array",
                                    "items": {
                                        "anyOf": [
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "if": {
                                                        "$ref": "#/definitions/Trigger/definitions/expression"
                                                    },
                                                    "then": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/definitions/Trigger/definitions/action"
                                                        }
                                                    },
                                                    "showThenActions": {
                                                        "type": "boolean",
                                                        "description": "Holds the current state of the Trigger GUI. Not used in runtime"
                                                    }
                                                }
                                            },
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "elseif": {
                                                        "$ref": "#/definitions/Trigger/definitions/expression"
                                                    },
                                                    "then": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/definitions/Trigger/definitions/action"
                                                        }
                                                    },
                                                    "showThenActions": {
                                                        "type": "boolean",
                                                        "description": "Holds the current state of the Trigger GUI. Not used in runtime"
                                                    }
                                                }
                                            },
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "else": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/definitions/Trigger/definitions/action"
                                                        }
                                                    },
                                                    "showThenActions": {
                                                        "type": "boolean",
                                                        "description": "Holds the current state of the Trigger GUI. Not used in runtime"
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "success": {
                                    "description": "Success callback action list.",
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "description": "Error callback action list.",
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "true", "false"]
                        },
                        {
                            "title": "SwitchCase",
                            "type": "object",
                            "description": "SWITCH .. CASE ..CASE - style condition",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["SwitchCase"]
                                },
                                "compare": {
                                    "$ref": "#/definitions/Trigger/definitions/value"
                                },
                                "cases": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/vCase"
                                    }
                                },
                                "caseDefault": {
                                    "$ref": "#/definitions/Trigger/definitions/dCase"
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "compare", "cases", "caseDefault"]
                        },
                        {
                            "title": "WriteToSymbol",
                            "type": "object",
                            "description": "Write To Symbol",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["WriteToSymbol"]
                                },
                                "symbolExpression": {
                                    "$ref": "#/definitions/Trigger/definitions/symbolExpression"
                                },
                                "value": {
                                    "$ref": "#/definitions/Trigger/definitions/value"
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "symbolExpression", "value"]
                        },
                        {
                            "title": "Function",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["Function"]
                                },
                                "fn": {
                                    "type": "string"
                                },
                                "fnParams": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/value"
                                    }
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "fn", "fnParams"]
                        },
                        {
                            "title": "JavaScript",
                            "type": "object",
                            "description": "Executes a user-defined JavaScript",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["JavaScript"]
                                },
                                "sourceLines": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "injectContextObject": {
                                    "type": "boolean",
                                    "description": "Inject context object.\nCall ctx.success() or ctx.error(TcHmi.Errors.ERROR)"
                                },
                                "waitMode": {
                                    "type": "string",
                                    "enum": ["Synchronous", "Asynchronous"],
                                    "description": "Synchronous: Next step will called after last JavaScript line. Asynchronous: Next step will called after calling ctx.success() or ctx.error(TcHmi.Errors.ERROR)"
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    },
                                    "description": "Steps which will be called after call of ctx.success() with Asynchronous or last line with Synchronous."
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    },
                                    "description": "Steps which will be called after call of ctx.success() with Asynchronous or an exception with Synchronous."
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean",
                                    "description": "The next step is called after the completion of this step."
                                }
                            },
                            "required": ["objectType", "sourceLines"]
                        },
                        {
                            "title": "ActionTemplate",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["ActionTemplate"]
                                },
                                "description": {
                                    "type": "string",
                                    "description": "A long description of this control."
                                },
                                "templateName": {
                                    "type": "string"
                                },
                                "fnParams": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/value"
                                    }
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "templateName", "fnParams"]
                        },
                        {
                            "title": "ControlApiFunction",
                            "type": "object",
                            "description": "",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["ControlApiFunction"]
                                },
                                "control": {
                                    "type": "string"
                                },
                                "fn": {
                                    "type": "string"
                                },
                                "fnParams": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/value"
                                    }
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "control", "fn"]
                        },
                        {
                            "title": "FunctionExpression",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["FunctionExpression"]
                                },
                                "functionExpression": {
                                    "type": "string"
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType", "functionExpression"]
                        },
                        {
                            "title": "Comment",
                            "type": "object",
                            "description": "Free comment. Will be ignored on runtime.",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["Comment"]
                                },
                                "target": {
                                    "$ref": "#/definitions/Trigger/definitions/comment"
                                },
                                "success": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "error": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/Trigger/definitions/action"
                                    }
                                },
                                "active": {
                                    "type": "boolean",
                                    "description": "Should action be active? Defaults to true.",
                                    "default": true
                                },
                                "collapsed": {
                                    "type": "boolean",
                                    "description": "Should action be collapsed? Not used in runtime",
                                    "default": false
                                },
                                "asyncWait": {
                                    "type": "boolean"
                                }
                            },
                            "required": ["objectType"]
                        }
                    ]
                },
                "value": {
                    "anyOf": [
                        {
                            "title": "StaticValue",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["StaticValue"]
                                },
                                "value": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "array"
                                        },
                                        {
                                            "type": "object"
                                        }
                                    ]
                                },
                                "valueType": {
                                    "type": "string"
                                }
                            },
                            "required": ["objectType", "value", "valueType"]
                        },
                        {
                            "title": "Symbol",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["Symbol"]
                                },
                                "symbolExpression": {
                                    "$ref": "#/definitions/Trigger/definitions/symbolExpression"
                                }
                            },
                            "required": ["objectType", "symbolExpression"]
                        },
                        {
                            "title": "EventDataObject",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["EventDataObject"]
                                },
                                "propertyPath": {
                                    "type": "string"
                                }
                            },
                            "required": ["objectType", "propertyPath"]
                        },
                        {
                            "title": "FunctionExpression",
                            "type": "object",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["FunctionExpression"]
                                },
                                "functionExpression": {
                                    "type": "string"
                                }
                            },
                            "required": ["objectType", "functionExpression"]
                        }
                    ]
                },
                "comment": {
                    "title": "Comment",
                    "type": "string"
                },
                "bindingTarget": {
                    "anyOf": [
                        {
                            "title": "ControlAttributeBindingTarget",
                            "type": "object",
                            "description": "",
                            "properties": {
                                "objectType": {
                                    "type": "string",
                                    "enum": ["ControlAttributeBindingTarget"]
                                },
                                "attributeExpression": {
                                    "$ref": "#/definitions/Trigger/definitions/controlAttributeSymbolExpression"
                                }
                            },
                            "required": ["objectType"]
                        }
                    ]
                },
                "expression": {
                    "title": "Expression",
                    "type": "object",
                    "properties": {
                        "compare1": {
                            "$ref": "#/definitions/Trigger/definitions/value"
                        },
                        "compare2": {
                            "$ref": "#/definitions/Trigger/definitions/value"
                        },
                        "compareOperator": {
                            "type": "string",
                            "enum": ["==", "===", "!=", "!==", "<", "<=", ">", ">="]
                        },
                        "logic": {
                            "anyOf": [
                                {
                                    "type": "string",
                                    "enum": ["AND", "OR"]
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "required": ["compare1", "compare2", "compareOperator"]
                },
                "vCase": {
                    "title": "VCase",
                    "type": "object",
                    "properties": {
                        "actions": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Trigger/definitions/action"
                            }
                        },
                        "caseValue": {
                            "$ref": "#/definitions/Trigger/definitions/value"
                        }
                    },
                    "required": ["actions", "caseValue"]
                },
                "dCase": {
                    "title": "DCase",
                    "type": "object",
                    "properties": {
                        "actions": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Trigger/definitions/action"
                            }
                        }
                    },
                    "required": ["actions"]
                },
                "symbolExpression": {
                    "title": "SymbolExpression",
                    "type": "string",
                    "pattern": "^%(s|i|l|pp|tp|f|ctrl|ctx|tr)%.+%\\1%$"
                },
                "controlSymbolExpression": {
                    "title": "controlSymbolExpression",
                    "type": "string",
                    "pattern": "^%(ctrl)%.+%\\1%$"
                },
                "controlAttributeSymbolExpression": {
                    "title": "ControlAttributeSymbolExpression",
                    "type": "string",
                    "pattern": "^%(ctrl)%.+%\\1%$"
                }
            },
            "type": "object",
            "properties": {
                "event": {
                    "type": "string",
                    "minLength": 1
                },
                "preventDefault": {
                    "type": "boolean",
                    "description": "If activated the default action of the event will not be triggered.\nIf set on touch events the corresponding mouse events will not be triggered."
                },
                "displayName": {
                    "type": "string",
                    "description": "Name which should be presented the user."
                },
                "actions": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/Trigger/definitions/action"
                    }
                }
            },
            "additionalProperties": false,
            "required": ["event", "actions"]
        }
    }
}
