{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "Set",
            "expression": "ExtCommonBusiness.ListChannels({})",
            "variableName": "channels"
          },
          {
            "command": "WriteModel",
            "expression": "^channels",
            "modelVariableName": "channels"
          },
          {
            "command": "Load",
            "expression": "Select(^channels, [id, name])",
            "widgetName": "cboChannels"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "channels",
            "type": "list(ExtCommonBusiness.Channel)"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "channels",
            "variableName": "channels"
          },
          {
            "children": [
              {
                "command": "GetValue",
                "variableName": "channelId",
                "widgetName": "cboChannels"
              },
              {
                "command": "Set",
                "expression": "FindFirst(^channels, id == ^channelId)",
                "variableName": "channel"
              },
              {
                "children": [
                  {
                    "command": "WriteModel",
                    "expression": "{ type: \"Channel\", id: ^channel.id, name: ^channel.name }",
                    "modelVariableName": "channel"
                  }
                ],
                "command": "If",
                "expression": "!IsNull(^channel)"
              }
            ],
            "command": "If",
            "expression": "!IsNull(^channels)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "channelId",
            "type": "string"
          },
          {
            "name": "channel",
            "type": "ExtCommonBusiness.Channel"
          },
          {
            "name": "channels",
            "type": "list(ExtPresales.SalesTeamChannel)"
          }
        ]
      },
      "name": "main_submit"
    }
  ],
  "model": [
    {
      "name": "channel",
      "required": false,
      "type": "ExtCommonBusiness.Channel"
    },
    {
      "name": "channels",
      "required": false,
      "type": "list(ExtPresales.SalesTeamChannel)"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "dataFormat": "KeyValueList",
                "label": "[[Channels]]",
                "last": true,
                "mandatory": true,
                "name": "cboChannels",
                "size": 2,
                "widget": "ComboBox"
              }
            ],
            "cssClass": "blz-area-default",
            "layout": "form"
          }
        ],
        "layout": "fit"
      }
    ],
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}