{
  "custom": {},
  "params": {
    "configuring": false,
    "equipmentPath": "Enterprise\\El Dorado Hills\\Packaging Area\\Packaging Line 1",
    "title": "SCO Recipe Selector"
  },
  "propConfig": {
    "params.configuring": {
      "onChange": {
        "enabled": null,
        "script": "\tviewParams\u003dself.params\n\tconfigParams\u003dself.getChild(\"root/configuration\").props.params\n\tif currentValue.value:\n\t\tconfigParams.equipmentPathIn \u003d viewParams.equipmentPath\t\n\t\tconfigParams.titleIn \u003d viewParams.title\n\telif previousValue is not None and previousValue.value:\n\t\tviewParams.equipmentPath \u003d configParams.equipmentPathOut\n\t\tviewParams.title \u003d configParams.titleOut "
      },
      "paramDirection": "input",
      "persistent": true
    },
    "params.equipmentPath": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.title": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 450,
      "width": 700
    }
  },
  "root": {
    "children": [
      {
        "children": [
          {
            "meta": {
              "name": "title"
            },
            "position": {
              "shrink": 0
            },
            "propConfig": {
              "position.display": {
                "binding": {
                  "config": {
                    "expression": "coalesce({view.params.title},\u0027\u0027)!\u003d\u0027\u0027"
                  },
                  "type": "expr"
                }
              },
              "props.params.text": {
                "binding": {
                  "config": {
                    "path": "view.params.title"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "path": "Page/Embedded/Widget Title"
            },
            "type": "ia.display.view"
          },
          {
            "meta": {
              "name": "Table"
            },
            "position": {
              "basis": "400px",
              "grow": 1
            },
            "propConfig": {
              "props.data": {
                "binding": {
                  "config": {
                    "path": "view.params.equipmentPath"
                  },
                  "transforms": [
                    {
                      "code": "\tactiveRecipe \u003d system.recipe.getCurrentItemRecipe(value)\n\trecipes \u003d system.recipe.getEquipmentRecipeList(value, \u0027*\u0027, \u0027\u0027, \u0027\u0027, True)\n\tdata \u003d []\n\tfor rec in recipes:\n\t\tif rec \u003d\u003d activeRecipe:\n\t\t\tdata.append({\n\t\t\t  \"Recipe\": {\n\t\t\t    \"value\": rec,\n\t\t\t    \"style\": {\n\t\t\t      \"backgroundColor\": \"#F7901D\",\n\t\t\t    }\n\t\t\t  },\n\t\t\t})\n\t\telse:\n\t\t\tdata.append({\n\t\t\t  \"Recipe\": rec\n\t\t\t})\n\t\n\tself.props.data \u003d data",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "rows": {
                "height": 40,
                "striped": {
                  "enabled": false
                },
                "style": {
                  "fontSize": 16
                }
              },
              "style": {
                "fontFamily": "Roboto"
              }
            },
            "scripts": {
              "customMethods": [
                {
                  "name": "updateTable",
                  "params": [
                    "eqPath"
                  ],
                  "script": "\tactiveRecipe \u003d system.recipe.getCurrentItemRecipe(eqPath)\n\t\n\trecipes \u003d system.recipe.getEquipmentRecipeList(eqPath, \u0027*\u0027, \u0027\u0027, \u0027\u0027, True)\n\tdata \u003d []\n\tfor rec in recipes:\n\t\tif rec \u003d\u003d activeRecipe:\n\t\t\tdata.append({\n\t\t\t  \"Recipe\": {\n\t\t\t    \"value\": rec,\n\t\t\t    \"style\": {\n\t\t\t      \"backgroundColor\": \"#F7901D\",\n\t\t\t    },\n\t\t\t    \"align\": \"center\",\n\t\t\t    \"justify\": \"left\"\n\t\t\t  },\n\t\t\t})\n\t\telse:\n\t\t\tdata.append({\n\t\t\t  \"Recipe\": rec\n\t\t\t})\n\t\n\tself.props.data \u003d data\n\t\t\n\t# implement your method here"
                }
              ],
              "extensionFunctions": null,
              "messageHandlers": []
            },
            "type": "ia.display.table"
          },
          {
            "events": {
              "component": {
                "onActionPerformed": {
                  "config": {
                    "script": "\tselectedRecipe \u003d self.getSibling(\"Table\").props.selection.data[0][\u0027Recipe\u0027]\n\teqPath \u003d self.view.params.equipmentPath\n\tsystem.recipe.setItemRecipe(eqPath, selectedRecipe, True)\n\t\n\tself.getSibling(\"Table\").updateTable(self.view.params.equipmentPath)"
                  },
                  "scope": "G",
                  "type": "script"
                }
              }
            },
            "meta": {
              "name": "Button"
            },
            "position": {
              "basis": "44px"
            },
            "props": {
              "text": "Activate"
            },
            "type": "ia.input.button"
          }
        ],
        "meta": {
          "name": "runtime"
        },
        "position": {
          "basis": "200px",
          "grow": 1,
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "expression": "!{view.params.configuring}"
              },
              "type": "expr"
            }
          }
        },
        "props": {
          "direction": "column",
          "style": {
            "overflow": "hidden"
          }
        },
        "type": "ia.container.flex"
      },
      {
        "meta": {
          "name": "configuration"
        },
        "position": {
          "basis": "320px",
          "grow": 1
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.configuring"
              },
              "type": "property"
            }
          },
          "props.params.equipmentPathIn": {
            "persistent": true
          }
        },
        "props": {
          "params": {
            "equipmentPathIn": "New Enterprise\\Site 1\\Area 1\\Packaging Line 1",
            "equipmentPathOut": "",
            "titleIn": "Asset Utilization",
            "titleOut": "Asset Utilization"
          },
          "path": "Page/Widgets/Configuration/Line Path, Title"
        },
        "type": "ia.display.view"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column",
      "style": {
        "overflow": "hidden"
      }
    },
    "type": "ia.container.flex"
  }
}