export const ctrlState = {
  controlCodeName: '{{ctrl.codeName}}',
  controlName: '{{ctrl.name}}',
  counter: 0,
  enableSearch: {{ctrl.enableSearch}},
  xDataControlName: '{{ctrl.xDataControlName}}',
  selection: {},
  searchValue: '',
  showTitleBar: {{#if ctrl.showTitleBar}}true{{else}}false{{/if}},
  split: 0.2,
  title: '{{ctrl.title}}',
  titleRes: '{{#if ctrl.titlePSLanguageRes}}{{ctrl.titlePSLanguageRes.lanResTag}}{{/if}}',
  {{#each ctrl.psControls as | childCtrl |}}
    {{#eq childCtrl.controlType 'TOOLBAR'}}
  toolbar: [
      {{#childCtrl.psDEToolbarItems}}
    { name:'{{name}}',caption:'{{caption}}',groupExtractMode:'{{groupExtractMode}}',itemType:'{{itemType}}',noPrivDisplayMode:'{{noPrivDisplayMode}}',showIcon:{{showIcon}},showCaption:{{showCaption}},tooltip:'{{tooltip}}',disabled: false, visible: true, imgPath: '{{imgPath}}',iconClass: '{{iconClass}}',xDataControlName:'{{xDataControlName}}',{{#if psUIAction}}uIAction:{codeName:'{{psUIAction.codeName}}',fullCodeName:'{{psUIAction.fullCodeName}}',uIActionMode:'{{psUIAction.uIActionMode}}',actionTarget:'{{psUIAction.actionTarget}}',uIActionTag:'{{psUIAction.uIActionTag}}',dataAccessAction:'{{psUIAction.dataAccessAction}}',uIActionType:'{{psUIAction.uIActionType}}'}{{#if psUIAction.counterId}},counterId: '{{psUIAction.counterId}}'{{/if}}{{/if}} },
      {{/childCtrl.psDEToolbarItems}}
  ],
    {{/eq}}
  {{/each}}
  viewRefs: [
    {{#each ctrl.psAppViewRefs as | viewRef |}}
    {
      name: '{{viewRef.name}}',
      {{#if viewRef.refPSAppView}}
      viewName: '{{viewRef.refPSAppView.name}}',
        {{#if viewRef.refPSAppView.psAppDataEntity}}
      deKeyField: '{{viewRef.refPSAppView.psAppDataEntity.codeName}}',
        {{/if}}
      {{/if}}
    },
    {{/each}}
  ]
};
