import { IParam } from "@core";

export const AppViewConfig:IParam = {
    {{#each app.pages as |appView|}}
  "{{appView.codeName}}":{
    "name": "{{appView.name}}",
    "codeName": "{{appView.codeName}}",
    "appEntityCodeName":"{{appView.appEntity.codeName}}",
    "openMode": "{{#if appView.openMode}}{{appView.openMode}}{{else}}INDEXVIEWTAB{{/if}}",
    "redirectView": {{appView.redirectView}},
    "deResPaths": [
    {{#each appView.appEntity.appEntityResources as |appEntityResource| }}
      {{appEntityResource.deResPaths}}{{#unless @last}},{{/unless}}
    {{/each}}
    ],
    "parameters": [
        { "pathName": "views", "parameterName": "{{lowerCase appView.codeName}}" }
    ],
    {{#if (gt appView.height 0)}}
    "height": {{appView.height}},
    {{/if}}
    {{#if (gt appView.width 0)}}
    "width": {{appView.width}},
    {{/if}}
    {{#if appView.capPSLanguageRes}}
    "captionTag": "{{appView.capPSLanguageRes.lanResTag}}",
    {{/if}}
    "caption": "{{appView.caption}}",
    {{#if appView.psSysImage}}
    "imgPath": "{{appView.psSysImage.imagePath}}",
    "iconCls": "{{appView.psSysImage.cssClass}}",
    {{/if}}
    "viewType": "{{appView.viewType}}",
    "fileDir": "@views/{{lowerCase app.codeName}}/{{spinalCase appView.codeName}}"
  }{{#unless @last}},{{/unless}}
{{/each}}
}