{
    "type": "panel",
    "i18n": true,
    "items": {
        "_headerLocal": {
            "type": "header",
            "text": "tabLocal",
            "size": 4,
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12
        },
        "enableLocal": {
            "type": "checkbox",
            "label": "enableLocal",
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "default": true,
            "help": "enableLocalHelp"
        },
        "_discover": {
            "type": "sendTo",
            "command": "discover",
            "jsonData": "{}",
            "label": "discoverButton",
            "icon": "search",
            "variant": "contained",
            "color": "primary",
            "useNative": true,
            "showProcess": true,
            "disabled": "!data.enableLocal",
            "xs": 12,
            "sm": 4,
            "md": 3,
            "lg": 3,
            "xl": 3
        },
        "_testConnection": {
            "type": "sendTo",
            "command": "testConnections",
            "jsonData": "{\"devices\": ${JSON.stringify(data.devices)}}",
            "label": "testConnectionButton",
            "icon": "send",
            "variant": "contained",
            "color": "primary",
            "useNative": true,
            "showProcess": true,
            "disabled": "!data.enableLocal",
            "xs": 12,
            "sm": 4,
            "md": 3,
            "lg": 3,
            "xl": 3
        },
        "devices": {
            "type": "table",
            "noDelete": false,
            "disabled": "!data.enableLocal",
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "items": [
                {
                    "type": "checkbox",
                    "title": "deviceEnabled",
                    "attr": "enabled",
                    "width": "60px",
                    "filter": false,
                    "sort": false,
                    "default": true
                },
                {
                    "type": "text",
                    "title": "deviceHost",
                    "attr": "host",
                    "width": "50%",
                    "filter": false,
                    "sort": false,
                    "default": ""
                },
                {
                    "type": "text",
                    "title": "deviceSerial",
                    "attr": "serial",
                    "disabled": "true",
                    "filter": false,
                    "sort": false,
                    "default": ""
                },
                {
                    "type": "checkbox",
                    "title": "deviceReachable",
                    "attr": "reachable",
                    "disabled": "true",
                    "width": "60px",
                    "filter": false,
                    "sort": false,
                    "default": false
                }
            ],
            "help": "devicesHelp"
        },
        "dataInterval": {
            "type": "number",
            "label": "dataInterval",
            "default": 5,
            "min": 0,
            "max": 300,
            "xs": 12,
            "sm": 6,
            "md": 4,
            "lg": 4,
            "xl": 4,
            "disabled": "!data.enableLocal",
            "help": "dataIntervalHelp"
        },
        "slowPollFactor": {
            "type": "number",
            "label": "slowPollFactor",
            "default": 6,
            "min": 1,
            "max": 60,
            "xs": 12,
            "sm": 6,
            "md": 4,
            "lg": 4,
            "xl": 4,
            "disabled": "!data.enableLocal",
            "help": "slowPollFactorHelp"
        },
        "enableCloudRelay": {
            "type": "checkbox",
            "label": "enableCloudRelay",
            "default": true,
            "xs": 12,
            "sm": 12,
            "md": 4,
            "lg": 4,
            "xl": 4,
            "disabled": "!data.enableLocal",
            "help": "enableCloudRelayHelp"
        },
        "_cloudRelayWarning": {
            "type": "staticText",
            "text": "cloudRelayWarning",
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "hidden": "!data.enableLocal || data.enableCloudRelay",
            "style": {
                "fontSize": 13,
                "color": "#e65100",
                "fontWeight": "bold"
            }
        },
        "_divider": {
            "type": "divider",
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12
        },
        "_headerCloud": {
            "type": "header",
            "text": "tabCloud",
            "size": 4,
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12
        },
        "enableCloud": {
            "type": "checkbox",
            "label": "enableCloud",
            "default": false,
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "help": "enableCloudHelp"
        },
        "enableRealtimeBurst": {
            "type": "checkbox",
            "label": "enableRealtimeBurst",
            "default": true,
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "disabled": "!data.enableCloud",
            "help": "enableRealtimeBurstHelp"
        },
        "cloudUser": {
            "type": "text",
            "label": "cloudUser",
            "placeholder": "email@example.com",
            "xs": 12,
            "sm": 6,
            "md": 6,
            "lg": 6,
            "xl": 6,
            "disabled": "!data.enableCloud",
            "validator": "!data.enableCloud || data.cloudUser !== ''",
            "validatorErrorText": "cloudUserRequired"
        },
        "cloudPassword": {
            "type": "password",
            "label": "cloudPassword",
            "xs": 12,
            "sm": 6,
            "md": 6,
            "lg": 6,
            "xl": 6,
            "disabled": "!data.enableCloud",
            "validator": "!data.enableCloud || data.cloudPassword !== ''",
            "validatorErrorText": "cloudPasswordRequired"
        },
        "_testCloudLogin": {
            "type": "sendTo",
            "command": "testCloudLogin",
            "jsonData": "{\"user\": \"${data.cloudUser}\", \"password\": \"${data.cloudPassword}\"}",
            "label": "testCloudLoginButton",
            "icon": "send",
            "variant": "contained",
            "color": "primary",
            "useNative": true,
            "showProcess": true,
            "disabled": "!data.enableCloud || !data.cloudUser || !data.cloudPassword",
            "help": "testCloudLoginHelp",
            "xs": 12,
            "sm": 6,
            "md": 6,
            "lg": 6,
            "xl": 6
        },
        "_cloudInfo": {
            "type": "staticText",
            "text": "cloudInfo",
            "xs": 12,
            "sm": 12,
            "md": 12,
            "lg": 12,
            "xl": 12,
            "style": {
                "fontSize": 12,
                "opacity": 0.7,
                "marginTop": 8
            }
        }
    }
}
