<nz-spin class="ctx-spin-fixed" [nzSpinning]="_applicationLoading" [nzDelay]="500">
  <nz-layout>

    <nz-content>
      <nz-tabset *ngIf="_applicationList.length > 0; else emptyTemplate" nzType="card">

        <nz-tab *ngFor="let application of _applicationList" [nzTitle]="application.source.name">
          <nz-tree #menuTreeComponent
            *ngIf="application.menuTreeNodeOptionList.length > 0; else emptyTemplate"
            [nzData]="application.menuTreeNodeOptionList"
            [nzCheckedKeys]="application.menuCheckedKeys"
            nzCheckable
            nzShowIcon
            (nzCheckBoxChange)="_updateMenuTreeStatus($event)"
            (nzDblClick)="_toggleMenuTreeNodeExpanded($event)"></nz-tree>
        </nz-tab>
      </nz-tabset>
    </nz-content>

    <div class="ctx-foot-action-bar">
      <div class="ctx-actions">
        <div class="ctx-action-item"><button nz-button nzType="primary" [nzLoading]="_submitLoading" (click)="_submit()">确定</button></div>
        <div class="ctx-action-item"><button nz-button (click)="_cancel()">取消</button></div>
      </div>
    </div>

  </nz-layout>
</nz-spin>

<ng-template #emptyTemplate>
  <nz-empty class="ant-empty-small" nzNotFoundImage="simple"></nz-empty>
</ng-template>
