{
  "custom": {},
  "params": {
    "change": "",
    "userInput": ""
  },
  "propConfig": {
    "params.change": {
      "binding": {
        "config": {
          "path": "/root/Label_1.props.text"
        },
        "transforms": [
          {
            "code": "\tif(self.getChild(\"root\").getChild(\"Label_1\").props.text).startswith(\"+\"):\n\t\tself.params.userInput \u003d  self.getChild(\"root\").getChild(\"FlexContainer\").getChild(\"TextArea\").props.text.strip()\n\telse:\n\t\tself.params.userInput \u003d \"\"\n\treturn value",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "paramDirection": "inout",
      "persistent": true
    },
    "params.counterName": {
      "paramDirection": "input",
      "persistent": false
    },
    "params.equipmentPath": {
      "paramDirection": "input",
      "persistent": false
    },
    "params.userInput": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 61
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "basis": "50px",
          "grow": 1
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "path": "view.params.counterName"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "style": {
            "textAlign": "center"
          }
        },
        "type": "ia.display.label"
      },
      {
        "meta": {
          "name": "Label_0"
        },
        "position": {
          "basis": "50px",
          "grow": 1
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "struct": {
                  "counterName": "{view.params.counterName}",
                  "equipmentPath": "{view.params.equipmentPath}"
                },
                "waitOnAll": true
              },
              "transforms": [
                {
                  "code": "\treturn system.mes.getTagCollectorLastValue(value[\"equipmentPath\"],\"Equipment Count\",value[\"counterName\"])\n\t",
                  "type": "script"
                }
              ],
              "type": "expr-struct"
            }
          }
        },
        "props": {
          "style": {
            "textAlign": "center"
          }
        },
        "type": "ia.display.label"
      },
      {
        "children": [
          {
            "meta": {
              "name": "TextArea"
            },
            "position": {
              "basis": "50px",
              "grow": 1
            },
            "props": {
              "placeholder": "Enter Number",
              "style": {
                "borderStyle": "none",
                "fontSize": 16,
                "fontWeight": "normal",
                "textAlign": "center",
                "wordSpacing": "100"
              }
            },
            "type": "ia.input.text-area"
          }
        ],
        "meta": {
          "name": "FlexContainer"
        },
        "position": {
          "basis": "50px",
          "grow": 1
        },
        "props": {
          "alignContent": "center",
          "alignItems": "center",
          "justify": "center",
          "style": {
            "backgroundColor": "#FFFFFF"
          }
        },
        "type": "ia.container.flex"
      },
      {
        "meta": {
          "name": "Label_1"
        },
        "position": {
          "basis": "50px",
          "grow": 1
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "struct": {
                  "last": "{../Label_0.props.text}",
                  "user": "{../FlexContainer/TextArea.props.text}"
                },
                "waitOnAll": true
              },
              "transforms": [
                {
                  "code": "\tuser \u003d str(value[\"user\"]).strip()\n\tlast \u003d str(value[\"last\"])\n\tif user.isdigit() and last.isdigit():\n\t\tdifference \u003d int(user) - int(last)\n\t\tif difference \u003e 0:\n\t\t\treturn \"+\" + str(difference)\n\t\telif difference \u003c 0:\n\t\t\treturn \"Error Cannot decrement\"\n\t\telif difference \u003d\u003d 0:\n\t\t\treturn \"Error No change\"\n\t\telse:\n\t\t\treturn \"\"\n\telif user \u003d\u003d \"\":\n\t\treturn \"\"\n\telif not user.isdigit():\n\t\treturn \"Error Input must be a valid numerical value.\"\n\t\t",
                  "type": "script"
                }
              ],
              "type": "expr-struct"
            }
          }
        },
        "props": {
          "style": {
            "textAlign": "center"
          }
        },
        "type": "ia.display.label"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "style": {
        "backgroundColor": "#FFFFFF"
      }
    },
    "type": "ia.container.flex"
  }
}