{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"Cards\"",
            "modelVariableName": "currency"
          },
          {
            "command": "Refresh",
            "widgetName": "currencyCards"
          },
          {
            "command": "SetValue",
            "expression": "{}",
            "widgetName": "currencyListOptions"
          },
          {
            "command": "SetValue",
            "expression": "{}",
            "widgetName": "currencyTitle"
          },
          {
            "command": "Show",
            "widgetName": "fitCurrencyCards"
          },
          {
            "command": "Hide",
            "widgetName": "fitCurrencyGrid"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadCurrencies(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "currencyCards_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadCurrencies(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "currencyGrid_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"Cards\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Show",
            "widgetName": "fitCurrencyCards"
          },
          {
            "command": "Hide",
            "widgetName": "fitCurrencyGrid"
          },
          {
            "command": "Refresh",
            "widgetName": "currencyCards"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "currencyListOptions_handlerRecordAction_cards"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"List\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Show",
            "widgetName": "fitCurrencyGrid"
          },
          {
            "command": "Hide",
            "widgetName": "fitCurrencyCards"
          },
          {
            "command": "Refresh",
            "widgetName": "currencyGrid"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "currencyListOptions_handlerRecordAction_list"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "Execute",
            "expression": "refresh()"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "currencyListOptions_handlerRecordAction_refresh"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "currency",
            "widgetName": "currencyCards"
          },
          {
            "command": "Execute",
            "expression": "editCurrency(^currency)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ]
      },
      "name": "currencyCards_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "currency",
            "widgetName": "currencyCards"
          },
          {
            "command": "Execute",
            "expression": "removeCurrency(^currency)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ]
      },
      "name": "currencyCards_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "currency",
            "widgetName": "currencyGrid"
          },
          {
            "command": "Execute",
            "expression": "editCurrency(^currency)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ]
      },
      "name": "currencyGrid_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "currency",
            "widgetName": "currencyGrid"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ]
      },
      "name": "currencyGrid_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"add.svg\"",
            "expressionStartModel": "{}",
            "expressionTitle": "\"[[AddCurrency]]\"",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpCbCurrencyEditor"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "refresh()"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          },
          {
            "name": "openedModel",
            "type": "any"
          }
        ]
      },
      "name": "btnAdd_click"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Set",
            "expression": "{}",
            "variableName": "argsListCurrency"
          },
          {
            "command": "Set",
            "expression": "Nvl(^args.limit,10)",
            "variableName": "argsListCurrency.limit"
          },
          {
            "command": "Set",
            "expression": "Nvl(^args.offset,0)",
            "variableName": "argsListCurrency.offset"
          },
          {
            "command": "Return",
            "expression": "ExtCommonBusiness.ListCurrencies(^argsListCurrency)"
          }
        ],
        "typeReturn": "list(ExtCommonBusiness.Currency)",
        "variables": [
          {
            "name": "argsListCurrency",
            "type": "ExtCommonBusiness.ArgsListCurrencies"
          }
        ]
      },
      "name": "loadCurrencies"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ],
        "statements": [
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"edit.svg\"",
            "expressionStartModel": "{currency: ^currency}",
            "expressionTitle": "\"[[EditCurrency]]\"",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpCbCurrencyEditor"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtCommonBusiness.UpdateCurrency(^currency.id, ^currency)"
              },
              {
                "command": "Execute",
                "expression": "refresh()"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "openedModel",
            "type": "any"
          }
        ]
      },
      "name": "editCurrency"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "currency",
            "type": "ExtCommonBusiness.Currency"
          }
        ],
        "statements": [
          {
            "command": "ConfirmMessage",
            "expressionMessage": "\"[[ConfirmRemoveCurrency]]\"",
            "expressionTitle": "\"[[RemoveCurrency]]\""
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtCommonBusiness.DeleteCurrency(^currency.id)"
              },
              {
                "command": "Execute",
                "expression": "refresh()"
              }
            ],
            "command": "OnYes"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "removeCurrency"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "presentationType",
            "variableName": "presentationType"
          },
          {
            "children": [
              {
                "command": "Show",
                "widgetName": "fitCurrencyCards"
              },
              {
                "command": "Hide",
                "widgetName": "fitCurrencyGrid"
              },
              {
                "command": "Refresh",
                "widgetName": "currencyCards"
              }
            ],
            "command": "If",
            "expression": "^presentationType==\"Cards\""
          },
          {
            "children": [
              {
                "command": "Show",
                "widgetName": "fitCurrencyGrid"
              },
              {
                "command": "Hide",
                "widgetName": "fitCurrencyCards"
              },
              {
                "command": "Refresh",
                "widgetName": "currencyGrid"
              }
            ],
            "command": "Else"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "presentationType",
            "type": "string"
          }
        ]
      },
      "name": "refresh"
    }
  ],
  "model": [
    {
      "name": "presentationType",
      "required": false,
      "type": "string"
    },
    {
      "name": "currency",
      "required": false,
      "type": "ExtCommonBusiness.Currency"
    },
    {
      "name": "filterName",
      "required": false,
      "type": "string"
    },
    {
      "name": "filterLetter",
      "required": false,
      "type": "string"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "children": [
                  {
                    "icon": "Send.svg",
                    "name": "currencyTitle",
                    "title": "[[Currency]]",
                    "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": "currencyListOptions",
                    "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:currency.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,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;\">[[NumericCode]]: {{numericCode}}</span>\n      \t   <span style=\"margin-top: 1px !important;\">[[Symbol]]: {{symbol}}</span>\n           <span style=\"margin-top: 1px !important;\">[[DecimalDigits]]: {{decimalDigits}}</span>\n\t\t</div>\n\t\t<div style=\"clear:both\"></div>\n    </article>\n</section>",
                    "name": "currencyCards",
                    "pageSize": 12,
                    "recordActions": [
                      {
                        "icon": "edit.svg",
                        "key": "edit",
                        "text": "[[Edit]]"
                      },
                      {
                        "icon": "remove.svg",
                        "key": "remove",
                        "text": "[[Remove]]"
                      }
                    ],
                    "typeName": "ExtCommonBusiness.Currency",
                    "widget": "HtmlRepeater",
                    "withPaging": true
                  }
                ],
                "layout": "fit",
                "name": "fitCurrencyCards"
              },
              {
                "children": [
                  {
                    "columns": [
                      {
                        "align": "left",
                        "bindText": "name",
                        "header": "[[Name]]",
                        "key": "name"
                      },
                      {
                        "align": "left",
                        "bindText": "code",
                        "header": "[[Code]]",
                        "key": "code"
                      },
                      {
                        "align": "center",
                        "bindText": "numericCode",
                        "header": "[[NumericCode]]",
                        "key": "numeric"
                      },
                      {
                        "align": "center",
                        "bindText": "symbol",
                        "header": "[[Symbol]]",
                        "key": "symbol"
                      },
                      {
                        "align": "center",
                        "bindText": "decimalDigits",
                        "header": "[[DecimalDigits]]",
                        "key": "decimal"
                      }
                    ],
                    "name": "currencyGrid",
                    "recordActions": [
                      {
                        "contextMenu": true,
                        "icon": "edit.svg",
                        "key": "edit",
                        "text": "[[Edit]]"
                      },
                      {
                        "contextMenu": true,
                        "icon": "remove.svg",
                        "key": "remove",
                        "text": "[[Remove]]"
                      }
                    ],
                    "typeName": "ExtCommonBusiness.Currency",
                    "widget": "Grid",
                    "withPaging": true
                  }
                ],
                "layout": "fit",
                "name": "fitCurrencyGrid"
              }
            ],
            "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-currencies"
  },
  "unused": [
    {
      "name": "filterContainer",
      "widget": "FixedContainer"
    }
  ]
}