{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"Cards\"",
            "modelVariableName": "domain"
          },
          {
            "command": "Refresh",
            "widgetName": "businessDomainCards"
          },
          {
            "command": "SetValue",
            "expression": "{}",
            "widgetName": "businessDomainListOptions"
          },
          {
            "command": "SetValue",
            "expression": "{}",
            "widgetName": "businessDomainTitle"
          },
          {
            "command": "Show",
            "widgetName": "fitBusinessDomainCards"
          },
          {
            "command": "Hide",
            "widgetName": "fitBusinessDomainGrid"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"Cards\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Show",
            "widgetName": "fitBusinessDomainCards"
          },
          {
            "command": "Hide",
            "widgetName": "fitBusinessDomainGrid"
          },
          {
            "command": "Refresh",
            "widgetName": "businessDomainCards"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "businessDomainListOptions_handlerRecordAction_cards"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"List\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Show",
            "widgetName": "fitBusinessDomainGrid"
          },
          {
            "command": "Hide",
            "widgetName": "fitBusinessDomainCards"
          },
          {
            "command": "Refresh",
            "widgetName": "businessDomainGrid"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "businessDomainListOptions_handlerRecordAction_list"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "presentationType",
            "variableName": "presentationType"
          },
          {
            "children": [
              {
                "command": "Show",
                "widgetName": "fitBusinessDomainCards"
              },
              {
                "command": "Hide",
                "widgetName": "fitBusinessDomainGrid"
              },
              {
                "command": "Refresh",
                "widgetName": "businessDomainCards"
              }
            ],
            "command": "If",
            "expression": "^presentationType==\"Cards\""
          },
          {
            "children": [
              {
                "command": "Show",
                "widgetName": "fitBusinessDomainGrid"
              },
              {
                "command": "Hide",
                "widgetName": "fitBusinessDomainCards"
              },
              {
                "command": "Refresh",
                "widgetName": "businessDomainGrid"
              }
            ],
            "command": "Else"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "presentationType",
            "type": "string"
          }
        ]
      },
      "name": "businessDomainListOptions_handlerRecordAction_refresh"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadBusinessDomain(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "businessDomainCards_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadBusinessDomain(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "businessDomainGrid_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "domain",
            "widgetName": "businessDomainCards"
          },
          {
            "command": "Execute",
            "expression": "editBusinessDomain(^domain)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "businessDomainCards_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "Set",
            "expression": "\"add\"",
            "variableName": "componentCode"
          },
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"add.svg\"",
            "expressionStartModel": "{componentCode:^componentCode}",
            "expressionTitle": "\"[[AddBusinessDomain]]\"",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpCbBussDomainEditor"
          },
          {
            "children": [
              {
                "command": "Refresh",
                "widgetName": "businessDomainCards"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "openedModel",
            "type": "any"
          },
          {
            "name": "componentCode",
            "type": "string"
          },
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "btnAdd_click"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "domain",
            "widgetName": "businessDomainCards"
          },
          {
            "command": "Execute",
            "expression": "removeBusinessDomain(^domain)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "businessDomainCards_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "domain",
            "widgetName": "businessDomainGrid"
          },
          {
            "command": "Execute",
            "expression": "editBusinessDomain(^domain)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "businessDomainGrid_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "domain",
            "widgetName": "businessDomainGrid"
          },
          {
            "command": "Execute",
            "expression": "removeBusinessDomain(^domain)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "businessDomainGrid_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordData",
            "type": "any"
          }
        ],
        "statements": [
          {
            "command": "Set",
            "expression": "{}",
            "variableName": "result"
          },
          {
            "command": "Set",
            "expression": "\"\"",
            "variableName": "icon"
          },
          {
            "children": [
              {
                "command": "Set",
                "expression": "\"undefined.png\"",
                "variableName": "icon"
              }
            ],
            "command": "If",
            "expression": "^recordData.isDeleted==\"undefined\""
          },
          {
            "children": [
              {
                "command": "Set",
                "expression": "\"check.png\"",
                "variableName": "icon"
              }
            ],
            "command": "Else"
          },
          {
            "command": "Set",
            "expression": "^icon",
            "variableName": "result.icon"
          },
          {
            "command": "Set",
            "expression": "\"\"",
            "variableName": "result.text"
          },
          {
            "command": "Return",
            "expression": "^result"
          }
        ],
        "typeReturn": "obj(icon:string, text:string)",
        "variables": [
          {
            "name": "icon",
            "type": "string"
          },
          {
            "name": "result",
            "type": "any"
          }
        ]
      },
      "name": "businessDomainGrid_renderColumn_isDeleted"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Set",
            "expression": "{}",
            "variableName": "argsListDomain"
          },
          {
            "command": "Set",
            "expression": "Nvl(^args.limit,10)",
            "variableName": "argsListDomain.limit"
          },
          {
            "command": "Set",
            "expression": "Nvl(^args.offset,0)",
            "variableName": "argsListDomain.offset"
          },
          {
            "command": "Return",
            "expression": "ExtCommonBusiness.ListBusinessDomains(^argsListDomain)"
          }
        ],
        "typeReturn": "list(ExtCommonBusiness.BusinessDomain)",
        "variables": [
          {
            "name": "argsListDomain",
            "type": "ExtCommonBusiness.ArgsListBusinessDomains"
          }
        ]
      },
      "name": "loadBusinessDomain"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ],
        "statements": [
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"edit.svg\"",
            "expressionStartModel": "{domain:^domain}",
            "expressionTitle": "\"[[EditBusinessDomain]]\"",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpCbBussDomainEditor"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "refresh()"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "openedModel",
            "type": "any"
          }
        ]
      },
      "name": "editBusinessDomain"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ],
        "statements": [
          {
            "command": "ConfirmMessage",
            "expressionMessage": "\"[[ConfirmRemoveBusinessDomain]]\"",
            "expressionTitle": "\"[[RemoveBusinessDomain]]\""
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtCommonBusiness.DeleteBusinessDomain(^domain.id)"
              },
              {
                "command": "Execute",
                "expression": "refresh()"
              }
            ],
            "command": "OnYes"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "removeBusinessDomain"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "presentationType",
            "variableName": "presentationType"
          },
          {
            "children": [
              {
                "command": "Refresh",
                "widgetName": "businessDomainGrid"
              }
            ],
            "command": "If",
            "expression": "^presentationType == \"List\""
          },
          {
            "children": [
              {
                "command": "Refresh",
                "widgetName": "businessDomainCards"
              }
            ],
            "command": "Else"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "presentationType",
            "type": "string"
          }
        ]
      },
      "name": "refresh"
    }
  ],
  "model": [
    {
      "name": "presentationType",
      "required": false,
      "type": "string"
    },
    {
      "name": "domain",
      "required": false,
      "type": "ExtCommonBusiness.BusinessDomain"
    },
    {
      "name": "componentCode",
      "required": false,
      "type": "string"
    },
    {
      "name": "filterName",
      "required": false,
      "type": "string"
    },
    {
      "name": "filterLetter",
      "required": false,
      "type": "string"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "children": [
                  {
                    "icon": "list-rich.svg",
                    "name": "businessDomainTitle",
                    "title": "[[BusinessDomain]]",
                    "widget": "HtmlRepeater"
                  }
                ],
                "cssClass": "blz-area-default blz-responsive-col-6",
                "layout": "fit",
                "size": 6
              },
              {
                "children": [
                  {
                    "icon": "add.svg",
                    "name": "btnAdd",
                    "text": "[[Add]]",
                    "widget": "Button"
                  }
                ],
                "cssClass": "blz-area-default blz-responsive-col-6 sd-text-align-right",
                "layout": "form",
                "size": 6
              }
            ],
            "cssClass": "blz-area-default blz-border-top blz-border-right blz-border-left blz-border-bottom blz-border-radius blz-cast-shadow",
            "layout": "responsive"
          }
        ],
        "cssClass": "blz-padding-top blz-padding-bottom-small",
        "layout": "responsive"
      },
      {
        "children": [
          {
            "children": [
              {
                "children": [
                  {
                    "htmlTemplate": "<div style=\"display: inline-flex\">\n\t<div title=\"\" class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain\n                         blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\" style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:cards]\">\n\t\t\t<span id=\"blz-button-10653-33-blz-btn-icon\" class=\"blz-btn-icon\">\n\t\t\t\t<img src=\"./icons/cards.svg\" style=\"width: 16px;\"/>\n\t\t\t</span>\n\t\t\t<span id=\"blz-button-10653-33-blz-btn-text\" class=\"blz-btn-text\"></span>\n\t\t\t<input type=\"text\" id=\"blz-button-10653-33-focus\" style=\"width: 1px; height: 1px;\">\n\t</div>\n\t<div title=\"\" class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain \n                         blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\" style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:list]\">\n\t\t\t<span id=\"blz-button-10653-33-blz-btn-icon\" class=\"blz-btn-icon\">\n\t\t\t\t[Icon:list.svg]\n\t\t\t</span>\n\t\t\t<span id=\"blz-button-10653-33-blz-btn-text\" class=\"blz-btn-text\"></span>\n\t\t\t<input type=\"text\" id=\"blz-button-10653-33-focus\" style=\"width: 1px; height: 1px;\">\n\t</div>\n  <div class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain \n                         blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\"\n        style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:refresh]\">\n        <span class=\"blz-btn-icon\">\n            [Icon:refresh.svg]\n        </span>\n        <span class=\"blz-btn-text\"></span>\n        <input type=\"text\" style=\"width: 1px; height: 1px;\">\n    </div>\n</div>",
                    "name": "businessDomainListOptions",
                    "recordActions": [
                      {
                        "key": "cards"
                      },
                      {
                        "key": "list"
                      },
                      {
                        "key": "refresh"
                      }
                    ],
                    "widget": "HtmlRenderer"
                  }
                ],
                "layout": "fit"
              },
              {
                "children": [
                  {
                    "htmlTemplate": "<section class=\"blz-cards-with-brief\" style=\"display:inline-block;\">\n    <article>\n        <section style=\"width:50px !important; height:50px !important\">[Icon:businessDomain.png]</section>\n        <section class=\"blz-cards-title\">\n            <article>\n                <span class=\"blz-text-title-md\">{{name}}</span>\n                <section>\n                    <span>[[Code]]: {{code}}</span>\n                </section>\n            </article>\n           <section class=\"blz-cards-header-dots\" onclick=\"[MultipleRecordAction:edit,enabled,remove]\" style=\"width:20px !important; height:20px !important;\">[Icon:dots-menu.svg]</section>  \n      </section>\n    </article>\n    <article>\n        <section class=\"blz-area-information\"> \n        </section>\n    </article>\n    <article class=\"blz-area-brief\" style=\"display: inline\">\n\t    <div style=\"display: inline-flex;align-content: space-between;flex-wrap: wrap;flex-direction: column;align-content: space-between;\">\n           <span style=\"margin-top: 8px !important;\">[[Enabled]]: {{#imageDeleted isDeleted}}{{/imageDeleted}}</span>\n\t\t</div>\n\t\t<div style=\"clear:both\"></div>\n    </article>\n</section>",
                    "name": "businessDomainCards",
                    "pageSize": 12,
                    "recordActions": [
                      {
                        "icon": "edit.svg",
                        "key": "edit",
                        "text": "[[Edit]]"
                      },
                      {
                        "icon": "check.svg",
                        "key": "isDeleted",
                        "text": "[[Enabled]]"
                      },
                      {
                        "icon": "remove.svg",
                        "key": "remove",
                        "text": "[[Remove]]"
                      }
                    ],
                    "typeName": "ExtCommonBusiness.BusinessDomain",
                    "widget": "HtmlRepeater",
                    "withPaging": true
                  }
                ],
                "layout": "fit",
                "name": "fitBusinessDomainCards"
              },
              {
                "children": [
                  {
                    "columns": [
                      {
                        "align": "left",
                        "bindText": "name",
                        "header": "[[Name]]",
                        "key": "name"
                      },
                      {
                        "align": "left",
                        "bindText": "code",
                        "header": "[[Code]]",
                        "key": "code"
                      },
                      {
                        "align": "center",
                        "bindText": "isDeleted",
                        "header": "[[Enabled]]",
                        "key": "isDeleted"
                      }
                    ],
                    "name": "businessDomainGrid",
                    "recordActions": [
                      {
                        "contextMenu": true,
                        "icon": "edit.svg",
                        "key": "edit",
                        "text": "[[Edit]]"
                      },
                      {
                        "contextMenu": true,
                        "icon": "check.svg",
                        "key": "isDeleted",
                        "text": "[[Enabled]]"
                      },
                      {
                        "contextMenu": true,
                        "icon": "remove.svg",
                        "key": "remove",
                        "text": "[[Remove]]"
                      }
                    ],
                    "typeName": "ExtCommonBusiness.BusinessDomain",
                    "widget": "Grid",
                    "withPaging": true
                  }
                ],
                "layout": "fit",
                "name": "fitBusinessDomainGrid"
              }
            ],
            "cssClass": "blz-area-default blz-flow-designer blz-mini-canvas-panel blz-padding-top blz-padding-right-small blz-padding-left-small blz-padding-bottom blz-border-top blz-border-right blz-border-left blz-border-bottom blz-border-radius blz-cast-shadow",
            "layout": "responsive"
          }
        ],
        "cssClass": "blz-padding-top-small blz-padding-bottom-small",
        "layout": "responsive"
      }
    ],
    "layout": "responsive"
  },
  "routing": {
    "path": "/cb-business-domain"
  },
  "unused": []
}