{
  "custom": {
    "baseTagValue": {},
    "bind": "value",
    "color": "#00FF00",
    "priority": "No Active Alarms",
    "state": "Enabled"
  },
  "params": {
    "tagProps": [
      "System/SMC/Chute/Chute_0",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value"
    ]
  },
  "propConfig": {
    "custom.baseTagValue": {
      "persistent": true
    },
    "custom.baseTagValue.Blocked_By_Operator": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Blocked_By_Operator/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Blocked_From_SCADA": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Blocked_From_SCADA/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Disabled": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Disabled/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Full": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Full/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Half_Full": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Half_Full/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Jam": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Jammed/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.No_Container": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/No_Container/"
        },
        "type": "tag"
      }
    },
    "custom.bind": {
      "persistent": true
    },
    "custom.color": {
      "binding": {
        "config": {
          "path": "view.custom.color"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\t\n\tif data.get(\"Jam\"):\n\t    return \"#FFA500\"\n\telif data.get(\"Full\"):\n\t    return \"#0000FF\"\n\telif data.get(\"Half_Full\"):\n\t    return \"#FFFF00\"\n\telif data.get(\"No_Container\"):\n\t    return \"#90EE90\"\n\telif data.get(\"Blocked_By_Operator\"):\n\t    return \"#C2C2C2\"\n\telif data.get(\"Blocked_From_SCADA\"):\n\t    return \"#C2C2C2\"\n\telif data.get(\"Disabled\") \u003d\u003d False:\n\t    return \"#00FF00\"\n\telse:\n\t    return \"#000000\"",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "custom.priority": {
      "binding": {
        "config": {
          "path": "view.custom.bind"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\n\tif data.get(\"Jam\"):\n\t    return \"High\"\n\telif data.get(\"Full\") or data.get(\"Half_Full\") or data.get(\"No_Container\") or data.get(\"Blocked_From_SCADA\") or data.get(\"Blocked_By_Operator\"):\n\t    return \"Low\"\n\telif data.get(\"Disabled\") \u003d\u003d False:\n\t    return \"No Active Alarms\"\n\n\treturn \"No Active Alarms\"",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "custom.state": {
      "binding": {
        "config": {
          "path": "view.custom.bind"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\t\n\tif data.get(\"Jam\"):\n\t    return \"Jammed\"\n\telif data.get(\"Full\"):\n\t    return \"Full\"\n\telif data.get(\"Half_Full\"):\n\t    return \"Half Full\"\n\telif data.get(\"No_Container\"):\n\t    return \"No Container\"\n\telif data.get(\"Blocked_By_Operator\"):\n\t    return \"Blocked By Operator\"\n\telif data.get(\"Blocked_From_SCADA\"):\n\t    return \"Blocked From SCADA\"\n\telif data.get(\"Disabled\") \u003d\u003d False:\n\t    return \"Enabled\"\n\telse:\n\t    return \"Inactive\"",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "params.tagProps": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 20,
      "width": 29
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "RunningStatus"
        },
        "position": {
          "grow": 1
        },
        "propConfig": {
          "position.rotate.angle": {
            "binding": {
              "config": {
                "path": "view.params.directionLeft"
              },
              "transforms": [
                {
                  "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
                  "type": "expression"
                }
              ],
              "type": "property"
            }
          },
          "props.elements[0].fill.paint": {
            "binding": {
              "config": {
                "path": "view.custom.color"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "elements": [
            {
              "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 0 0 Z",
              "fill": {},
              "name": "path",
              "stroke": {
                "paint": "#4c4c4c",
                "width": 3
              },
              "type": "path"
            }
          ],
          "style": {
            "overflow": "hidden"
          },
          "viewBox": "-1.5 -1.5 73 63"
        },
        "type": "ia.shapes.svg"
      }
    ],
    "events": {
      "dom": {
        "onClick": {
          "config": {
            "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root",
      "tooltip": {
        "enabled": true,
        "location": "top-left",
        "style": {}
      }
    },
    "propConfig": {
      "meta.tooltip.style.classes": {
        "binding": {
          "config": {
            "expression": "{view.custom.priority}"
          },
          "transforms": [
            {
              "fallback": "Alarms-Styles/NoAlarm",
              "inputType": "scalar",
              "mappings": [
                {
                  "input": "High",
                  "output": "Alarms-Styles/High"
                },
                {
                  "input": "Medium",
                  "output": "Alarms-Styles/Medium"
                },
                {
                  "input": "Low",
                  "output": "Alarms-Styles/Low"
                },
                {
                  "input": "Diagnostic",
                  "output": "Alarms-Styles/Diagnostic"
                }
              ],
              "outputType": "style-list",
              "type": "map"
            }
          ],
          "type": "expr"
        }
      },
      "meta.tooltip.text": {
        "binding": {
          "config": {
            "expression": "if(\n    {view.custom.state} !\u003d \"TagError\",\n    \"Source Id: \" + {view.params.tagProps[1]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n    \"Device Disconnected\"\n)\n"
          },
          "type": "expr"
        }
      },
      "meta.visible": {
        "binding": {
          "config": {
            "expression": "({view.custom.priority} \u003d \"High\") || {session.custom.alarm_filter.show_chutes}\r\n"
          },
          "type": "expr"
        }
      }
    },
    "props": {
      "justify": "center"
    },
    "type": "ia.container.flex"
  }
}