<ng-template cdk-portal>
  <bis-container class="suggest">
    <bis-header>
    <!-- Changes made by Pratheek On 18-06-19 [to apply theme color for the header for both welcome panel and quick action panel]-Start -->
      <div class="bis-header" style="background-color: var(--primary)!important">
        <span class="bis-cancel" 
              touch-click (onTouchClick)="onCancel();">
            <i class="material-icons">close</i>
        </span>
        <div class="bis-header-suggest">
            {{title}}
        </div>
        <span *ngIf="pophelpConfig" class="bis-cancel" 
              touch-click (onTouchClick)="onDone();">
            <i class="material-icons">done</i>
        </span>
      </div>
    </bis-header>
    <bis-content>
      <ng-container *ngIf='pophelpConfig;then argPophelpTempl else intentPophelpTempl'></ng-container>
    </bis-content>
  </bis-container>
</ng-template>
<!-- Commented By Sainath T. On 03/12/2018 -->
<!-- <ng-template #intentPophelpTempl>
  <section class="bis-content">
    <ol class="suggest-list">
      <li *ngFor= 'let intent of pophelpData' class="suggest-item" 
          touch-click (onTouchClick)="onSelectionChange(intent);onDone();">
        <span>{{intent.INVOC_DESCR}}</span>
      </li>
    </ol>
  </section>
</ng-template> -->

<!-- By Sainath T. on 03/12/2018 [for display intents group wise] -START-->
<ng-template  #intentPophelpTempl>
  <div class="bis-content">
    <mat-accordion>
      <ng-container *ngFor= 'let intents of pophelpData' class="suggest-item">
      <mat-expansion-panel class="my-sidenav">
        <mat-expansion-panel-header class = "intent-group-title">
          <mat-panel-title>
            {{intents.key}}
          </mat-panel-title>
        </mat-expansion-panel-header>
        <mat-list class="suggest-list">
          <mat-list-item *ngFor="let intent of intents.objects" class="suggest-item"
          touch-click (onTouchClick)="onSelectionChange(intent);onDone();">
          {{intent.INVOC_DESCR}}
          </mat-list-item>
        </mat-list>
      </mat-expansion-panel>
      </ng-container>
    </mat-accordion>
  </div>
</ng-template>
<!-- By Sainath T. on 03/12/2018 [for display intents group wise] -END-->

<!-- Sainath T. on 23-11-18 [otherFormat is formGroup json, it is pass to filter depenedent pophelp json] -->
<!-- Added isFilter true to filter pophelp data on input text or filtervalue -->
<ng-template #argPophelpTempl>
  <ang-pophelp [dataSource]="pophelpConfig.data_model_name"
    [multi_opt]="pophelpConfig.multi_opt"
    [showHeader]="false"
    [filterValue]="pophelpConfig.fieldValue"
    [layoutTemplName]="'bislayout'"
    [showSearch]="true"
    [isFilter]="true"
    [formGroup]="formGroup" 
    (onClose)="onCancel();"
    (onSelect)="onSelectionChange($event);"
    (onDblClick)= "onSelectionChange($event); onDone();">
  </ang-pophelp>
</ng-template>