{ "custom": { "colorHandler": { "auto": "#27669C", "manual": "#9C6427", "none": "#FFFFFF" } }, "params": { "Mode": 1, "options": [ "A", "M" ] }, "propConfig": { "custom.colorHandler": { "persistent": true }, "params.Mode": { "paramDirection": "input", "persistent": true }, "params.options": { "paramDirection": "input", "persistent": true } }, "props": { "defaultSize": { "height": 20, "width": 20 } }, "root": { "children": [ { "meta": { "name": "Label" }, "position": { "basis": "100%", "grow": 1 }, "propConfig": { "props.style.backgroundColor": { "binding": { "config": { "path": "view.params.Mode" }, "transforms": [ { "code": "\tif value \u003c 1:\n\t\toutput \u003d self.view.custom.colorHandler.none\n\tif value \u003d\u003d 1:\n\t\toutput \u003d self.view.custom.colorHandler.auto\n\tif value \u003d\u003d 2:\n\t\toutput \u003d self.view.custom.colorHandler.manual\n\tif value \u003e 2:\n\t\toutput \u003d self.view.custom.colorHandler.none\n\t\n\n\treturn output", "type": "script" } ], "type": "property" } }, "props.text": { "binding": { "config": { "path": "view.params.Mode" }, "transforms": [ { "fallback": "none", "inputType": "scalar", "mappings": [ { "input": 1, "output": "A" }, { "input": 2, "output": "M" } ], "outputType": "scalar", "type": "map" } ], "type": "property" } } }, "props": { "style": { "borderBottomLeftRadius": "var(--borderRadius)", "borderBottomRightRadius": "var(--borderRadius)", "borderTopLeftRadius": "var(--borderRadius)", "borderTopRightRadius": "var(--borderRadius)", "paddingLeft": 5, "paddingRight": 5 }, "textStyle": { "color": "#FFFFFF", "fontSize": 12, "textAlign": "center" } }, "type": "ia.display.label" } ], "meta": { "name": "root" }, "props": { "direction": "column", "style": { "borderBottomLeftRadius": "var(--borderRadius)", "borderBottomRightRadius": "var(--borderRadius)", "borderTopLeftRadius": "var(--borderRadius)", "borderTopRightRadius": "var(--borderRadius)", "boxShadow": "var(--boxShadow1)", "overflow": "visible" } }, "type": "ia.container.flex" } }