<!-- <div class="w-full min-height-50px mb-10px justify-between items-center">
  <div class="flex justify-between">
    <div class="flex">
      <div class="flex items-center">
        <input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox"
          [(ngModel)]="isDataListChecked">
        <label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none">
          {{numDataListChecked}} Selected</label>
      </div>
      <div class="mx-1 flex items-center">
        <button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()" id="check-boxall"
          class="focus:ring-2 focus:ring-primary rounded-sm flex item-center">
          <i class="fs-l transition-all duration-200"
            [ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i>
        </button>
        <label class="text-sm text-gray-500 ml-2" for="check-boxall">Select All</label>
      </div>
    </div>

    <div class="flex justify-end">
      <div class="px-1">
        <div class="relative shadow-md">
          <input type="text" id="hs-leading-icon" name="hs-leading-icon"
            class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
            [(ngModel)]="search" (ngModelChange)="searchChange()" style="height: 40px;">
          <div
            class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
            <i class="ri-search-line text-gray"></i>
          </div>
        </div>
      </div>
      <div class="px-1">
        <button type="button"
          class="ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 dark:focus:ring-offset-white/10 h-10 m-0 shadow-md"
          data-hs-overlay="#assessment-topics-upload-modal"
          (click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
          <i class="ti ti-file-plus"></i>
          import
        </button>
      </div>
      <div class="px-1">
        <button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
            (click)="modalStatus='add';selectPmstype();selectPmstopic();openDialog();">
            <i class="ri-add-line"></i>
            Add
        </button>
      </div>
    <div class="px-1">
      <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
          (click)="modalStatus='delete';selectPmstopic()" >
          <i class="ri-delete-bin-6-line"></i>
          Delete
      </button>
  </div>
  </div>
</div> -->

<div class="w-full min-height-50px mb-10px justify-between items-center">
  <div class="flex justify-end">
    <div class="px-1">
      <div class="relative shadow-md">
        <input type="text" id="hs-leading-icon" name="hs-leading-icon"
          class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
          [(ngModel)]="search">

        <div
          class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
          <i class="ri-search-line text-gray"></i>
        </div>
      </div>
    </div>
    <div class="px-1">
      <button type="button"
        class=" h-45px ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 dark:focus:ring-offset-white/10 h-10 m-0 shadow-md"
        data-hs-overlay="#assessment-topics-upload-modal"
        (click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
        <i class="ti ti-file-plus"></i>
        {{'Import' | translate}}
      </button>
    </div>
    <div class="px-1">
      <button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
        (click)="modalStatus='add';selectPmstype();selectPmstopic();openDialog();">
        <i class="ri-add-line"></i>
        {{'Add' | translate}}
      </button>
    </div>
    <div class="px-1">
      <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
        (click)="modalStatus='delete';selectPmstopic();deletepmsTopics()">
        <i class="ri-delete-bin-6-line"></i>
        {{'Delete' | translate}}
      </button>
    </div>
  </div>
</div>

<!-- <div class="page px-rem">
  <div class="overflow-auto shadow-md rounded-t-md">
    <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover table-bordered">
      <thead>
        <tr>
          <ng-container
            *ngFor="let item of ['','รหัส','ชื่อหัวข้อ','ชื่อประเภท','การจัดการ']; let f = first; let l = last; let i = index">
            <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
              <span class="font-size-12px font-weight-700">{{ item }}</span>
              <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l&&!f">
                <i class="ti ti-dots-vertical fs-l"></i>
              </div>
            </th>
          </ng-container>
        </tr>
      </thead>
      <tbody *ngIf="pmstopic.loading">
        <tr>
          <td class="text-center" colspan="100%">
            <div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1" role="status"
              aria-label="loading">
              <span class="sr-only">Loading...</span>
            </div>
          </td>
        </tr>
      </tbody>
      <tbody *ngIf="!pmstopic.loading&&!pmstopicListFilter().length">
        <tr>
          <td class="text-center" colspan="100%">
            ไม่พบข้อมูล
          </td>
        </tr>
      </tbody>
      <tbody *ngIf="!pmstopic.loading&&pmstopicListFilter().length">
        <tr
          *ngFor="let item of pmstopicListFilter()| slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index">
          <td class="text-center"><input type="checkbox" class="ti-form-checkbox cursor-pointer"
              id="checkbox-{{item.data.pmsTopicId}}" [(ngModel)]="item.check" (change)="dataListCheck()"></td>
          <td>

            <label for="checkbox-{{item.data.pmsTopicId}}">&nbsp;{{item.data.pmsTopicId}}</label>
          </td>
          <td>{{item.data.tdesc}}</td>
          <td class="text-center">{{item.data.pmsType.tdesc}}</td>
          <td class="flex justify-center">
            <i class="ti ti-edit cursor-pointer i-gray fs-l px-1" (click)="modalStatus='edit';selectPmstopic(item.data)"
              data-hs-overlay="#assessment-topics-modal"></i>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length">
    <ul class="ti-pagination">
      <li>
        <a aria-label="anchor" class="page-link" href="javascript:void(0);"
          (click)="currentPage = (currentPage-1 || 1)">
          <i class="ri-arrow-left-s-line align-middle rtl:rotate-180"></i>
        </a>
      </li>
      <li *ngFor="let item of page;let f = first;let l = last">
        <ng-container *ngIf="item==3&&currentPage!=1&&currentPage!=2&&currentPage!=3">
          <a aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
          </a>
        </ng-container>
        <ng-container *ngIf="(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)">
          <a class="page-link" href="javascript:void(0);" [class.active]="item==currentPage"
            (click)="currentPage=item">{{item}}
          </a>
        </ng-container>
        <ng-container
          *ngIf="item==page.length-2&&currentPage!=page.length&&currentPage!=page.length-1&&currentPage!=page.length-2">
          <a aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
          </a>
        </ng-container>
      </li>
      <li>
        <a aria-label="anchor" class="page-link" href="javascript:void(0);"
          (click)="currentPage = (currentPage > page.length-1 ? currentPage: currentPage+1 )">
          <i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
        </a>
      </li>
    </ul>
    <ul class="nav-tabs mt-3">
      <span>Show {{((currentPage-1) * 10)+1}} to {{pmstopicListFilter().length<10 ?pmstopicListFilter().length:
          (currentPage==page.length ? ((currentPage * 10) - ((currentPage * 10) - pmstopicListFilter().length) )
          :(currentPage * 10) ) }} of {{pmstopicListFilter().length}} items</span>
    </ul>
  </nav>
</div> -->
<div class="page px-rem">
  <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="syncfutionDataList"
    [columns]="columns" [selectedItems]="selectedItems"
    (sendSelectData)="modalStatus='edit';selectPmstopic($event);openDialog()"
    (sendSelectedItems)="onSelectItemChange($event)">
  </app-datagrid-syncfution>
</div>



<ng-template #assessmentTopicsModal let-modal>
  <h3 mat-dialog-title>
    {{modalStatus=='add'?'เพิ่มหัวข้อการประเมิน':'เเก้ไขหัวข้อการประเมิน'}}
  </h3>
  <div class="w-full flex justify-end mb-1rem">
    <div class="absolute flex">
      <div class="px-1">
        <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
          (click)="selectPmstype();selectPmstopic()">
          <i class="ti ti-eraser text-base"></i>
          Clear
        </button>
      </div>
    </div>
  </div>
  <mat-dialog-content>
    <label class="ti-form-label mt-2rem">รหัส<span class="text-danger">*<ng-container
          *ngIf="modalStatus=='add'&&checkPrimary()">
          รหัสซ้ำ
        </ng-container></span></label>
    <input type="text" class="ti-form-input w-1/2" [class.!bg-input-readonly]="modalStatus=='edit'"
      [readonly]="modalStatus=='edit'" [(ngModel)]="pmstopic.select.pmsTopicId">
    <label class="ti-form-label mt-2rem">ประเภทการประเมินผล<span class="text-danger">*</span></label>
    <div class="flex">
      <div class="relative flex rounded-md">
        <input type="text" class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10" readonly
          style="padding-right: 3.5rem;" [(ngModel)]="pmstopic.select.pmsType.tdesc">
        <div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
          <button type="button" class="flex items-center text-red-500" (click)="selectPmstype()">
            <i class="ti ti-circle-x cursor-pointer"></i>
          </button>
          <button type="button" class="flex items-center text-gray-500 dark:text-white/70"
            (click)="openpmsTypeDialog()">
            <i class="ri-search-line cursor-pointer text-gray"></i>
          </button>
        </div>
      </div>
    </div>
    <label class="ti-form-label mt-2rem">ชื่อหัวข้อ<span class="text-danger">*</span></label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.tdesc">
    <label class="ti-form-label mt-2rem">ชื่อหัวข้อ (อังกฤษ)</label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.edesc">
    <label class="ti-form-label mt-2rem">ตัวชี้วัดผลงานหลัก</label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.indicatorsDetail">
    <label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.performanceGoalsDetail">
    <label class="ti-form-label mt-2rem">หน่วยนับ</label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.detailUnit">
    <label class="ti-form-label mt-2rem">กำหนดเวลาแล้วเสร็จ</label>
    <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.completionDate">
    <label class="ti-form-label mt-2rem">น้ำหนัก</label>
    <input type="text" class="ti-form-input"
      oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
      onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
      [(ngModel)]="pmstopic.select.weight">
    <label class="ti-form-label mt-2rem">ค่าเป้าหมาย</label>
    <div class="grid grid-cols-12 gap-x-2 mt-2rem">
      <label class="ti-form-label  col-span-3 align-center m-0">A (5 คะแนน)</label>
      <input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetAdetail">
    </div>
    <div class="grid grid-cols-12 gap-x-2 mt-2rem">
      <label class="ti-form-label  col-span-3 align-center m-0">B (4 คะแนน)</label>
      <input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetBdetail">
    </div>
    <div class="grid grid-cols-12 gap-x-2 mt-2rem">
      <label class="ti-form-label  col-span-3 align-center m-0">C (3 คะแนน)</label>
      <input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetCdetail">
    </div>
    <div class="grid grid-cols-12 gap-x-2 mt-2rem">
      <label class="ti-form-label  col-span-3 align-center m-0">D (2 คะแนน)</label>
      <input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetDdetail">
    </div>
    <div class="grid grid-cols-12 gap-x-2 mt-2rem">
      <label class="ti-form-label  col-span-3 align-center m-0">E (1 คะแนน)</label>
      <input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetEdetail">
    </div>
  </mat-dialog-content>
  <mat-dialog-actions align="end">
    <button type="button" mat-button [mat-dialog-close]
      class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10">
      ย้อนกลับ
    </button>
    <button type="button" class="ti-btn ti-btn-success" mat-button
      [class.ti-btn-disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())"
      (click)="addpmsTopics()"
      [disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())">
      บันทึกข้อมูล
    </button>
  </mat-dialog-actions>
</ng-template>

<ng-template #assessmentTopoicsTypeModal let-modal>
  <h3 mat-dialog-title>
    รายการประเภทการประเมิน
  </h3>
  <mat-dialog-content>
    <div class="flex justify-end pb-1rem">
      <div class="px-1">
        <div class="relative shadow-md">
          <input type="text" id="hs-leading-icon" name="hs-leading-icon"
            class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
            [(ngModel)]="pmstypemodal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
          <div
            class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
            <i class="ri-search-line text-gray"></i>
          </div>
        </div>
      </div>
    </div>
    <div class="overflow-auto border">
      <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
        <thead>
          <tr>
            <ng-container *ngFor="let item of ['ลำดับ','รหัส','ชื่อหัวข้อ','ชื่อประเภท']; let f = first; let l = last">
              <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" [class.!text-center]="f">
                <span class="text-sm">{{ item }}</span>
                <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
                  <i class="ti ti-dots-vertical fs-l"></i>
                </div>
              </th>
            </ng-container>
          </tr>
        </thead>
        <tbody *ngIf="!pmstypeListFilter().length">
          <tr>
            <td class="text-center" colspan="100%">
              ไม่พบข้อมูล
            </td>
          </tr>
        </tbody>
        <tbody *ngIf="pmstypeListFilter().length">
          <tr
            *ngFor="let item of pmstypeListFilter() | slice:((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) : (((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) + pmstypemodal.pageSize);let i = index"
            class="cursor-pointer" (click)="selectPmstype(item.data);closepmsTypeDialog()">
            <td class="flex justify-center">
              {{((pmstypemodal.currentPage-1) * pmstypemodal.pageSize)+(i+1)}}
            </td>
            <td>{{item.data.pmsTypeId}}</td>
            <td>{{item.data.tdesc}}</td>
            <td>{{item.data.shortName}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <app-pagination [totalItems]="pmstypeListFilter().length" [pageSize]="pmstypemodal.pageSize"
      (pageChange)="pmstypemodal.currentPage = $event"
      (pageSizeChange)="pmstypemodal.pageSize = $event;pmstypemodal.currentPage = 1"></app-pagination>
  </mat-dialog-content>
  <mat-dialog-actions align="end">
    <button type="button" mat-button [mat-dialog-close]
      class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10">
      ย้อนกลับ
    </button>
  </mat-dialog-actions>
</ng-template>

<div id="assessment-topics-upload-modal" class="hs-overlay hidden ti-modal">
  <div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md">
    <div class="ti-modal-header bg-primary !rounded-none !rounded-t-sm">
      <h5 class="text-xxl font-bold text-white">
        นำเข้าหัวข้อการประเมิน
      </h5>
    </div>
    <div class="ti-modal-body max-h-full overflow-hidden ti-modal-content !rounded-t-none !rounded-b-sm">
      <h1 class="mt-2" style="text-align: center;">ไฟล์</h1>
      <div class="mt-2 p-2">
        <div class="flex rounded-md">
          <input #fileInput id="fileInput" type="file" (change)="onFileSelected($event)" hidden>
          <input type="text" [value]="selectedFileName" readonly (click)="fileInput.click()"
            class="ti-form-input rounded-none ltr:rounded-l-md rtl:rounded-r-md focus:z-10 cursor-pointer">
          <button type="button" (click)="fileInput.click()"
            class="inline-flex flex-shrink-0 justify-center items-center h-[2.875rem] w-[2.875rem] ltr:rounded-r-md rtl:rounded-l-md border border-transparent font-semibold bg-secondary text-white hover:bg-secondary focus:z-10 focus:outline-none focus:ring-0 focus:ring-secondary transition-all text-sm">
            <i class="ti ti-upload"></i>
          </button>
        </div>
        <div class="flex justify-center mt-2rem ">
          <h1 class="cursor-pointer justify-center -mb-px inline-flex items-center gap-2 font-weight-500 font-size-12px
                  text-center text-secondary border-secondary border-b-2 align-items-end" (click)="downloadFile()">
            ดาวน์โหลดตัวอย่างไฟล์</h1>
        </div>
        <div class="flex justify-center mt-2rem mb-1rem space-x-4">
          <button type="submit" class="ti-btn ti-btn-secondary" data-hs-overlay="#assessment-topics-upload-modal"
            [class.ti-btn-disabled]="!selectedFile" (click)="uploadFile()" [disabled]="!selectedFile"
            [disabled]="!selectedFile">
            อัปโหลด
          </button>
        </div>
      </div>
    </div>
  </div>
</div>




<!-- <div id="assessment-topic-pmstype-table-modal" class="hs-overlay hidden ti-modal">
  <div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto">
    <div class="max-h-full overflow-hidden ti-modal-content">
      <div class="ti-modal-header">
        <h3 class="text-xxl font-bold text-primary">
          รายการประเภทการประเมิน
        </h3>
        <div class="flex justify-end">
          <button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
            data-hs-overlay="#assessment-topics-modal">
            <span class="sr-only">Close</span>
            <i class="ti ti-circle-x fs-xxl"></i>
          </button>
        </div>
      </div>
      <div class="ti-modal-body">
        <div class="flex justify-end pb-1rem">
          <div class="px-1">
            <div class="relative shadow-md">
              <input type="text" id="hs-leading-icon" name="hs-leading-icon"
                class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
                [(ngModel)]="modal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
              <div
                class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
                <i class="ri-search-line text-gray"></i>
              </div>
            </div>
          </div>
        </div>
        <div class="overflow-auto border">
          <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
            <thead>
              <tr>
                <ng-container *ngFor="let item of ['รหัส',	'ชื่อหัวข้อ',	'ชื่อประเภท']; let f = first; let l = last">
                  <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
                    [class.!text-center]="f">
                    <span class="text-sm">{{ item }}</span>
                    <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
                      <i class="ti ti-dots-vertical fs-l"></i>
                    </div>
                  </th>
                </ng-container>
              </tr>
            </thead>
            <tbody *ngIf="!pmstypeListFilter().length">
              <tr>
                <td class="text-center" colspan="100%">
                  ไม่พบข้อมูล
                </td>
              </tr>
            </tbody>
            <tbody *ngIf="pmstypeListFilter().length">
              <tr
                *ngFor="let item of pmstypeListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
                class="cursor-pointer" (click)="selectPmstype(item.data)" data-hs-overlay="#assessment-topics-modal">
                <td>{{item.data.pmsTypeId}}</td>
                <td>{{item.data.tdesc}}</td>
                <td>{{item.data.shortName}}</td>
              </tr>
            </tbody>
          </table>
        </div>
        <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
          <ul class="ti-pagination">
            <li>
              <a aria-label="anchor" class="page-link" href="javascript:void(0);"
                (click)="modal.currentPage = (modal.currentPage-1 || 1)">
                <i class="ri-arrow-left-s-line align-middle rtl:rotate-180"></i>
              </a>
            </li>
            <li *ngFor="let item of modal.page;let f = first;let l = last">
              <ng-container *ngIf="item==3&&modal.currentPage!=1&&modal.currentPage!=2&&modal.currentPage!=3">
                <a aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
                </a>
              </ng-container>
              <ng-container
                *ngIf="(f||l)||(item==modal.currentPage-1||item==modal.currentPage||item==modal.currentPage+1)">
                <a class="page-link" href="javascript:void(0);" [class.active]="item==modal.currentPage"
                  (click)="modal.currentPage=item">{{item}}
                </a>
              </ng-container>
              <ng-container
                *ngIf="item==modal.page.length-2&&modal.currentPage!=modal.page.length&&modal.currentPage!=modal.page.length-1&&modal.currentPage!=modal.page.length-2">
                <a aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
                </a>
              </ng-container>
            </li>
            <li>
              <a aria-label="anchor" class="page-link" href="javascript:void(0);"
                (click)="modal.currentPage = (modal.currentPage > modal.page.length-1 ? modal.currentPage: modal.currentPage+1 )">
                <i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
              </a>
            </li>
          </ul>
          <ul class="nav-tabs mt-3">
            <span>Show {{((modal.currentPage-1) * 10)+1}} to {{pmstypeListFilter().length<10
                ?pmstypeListFilter().length: (modal.currentPage==modal.page.length ? ((modal.currentPage * 10) -
                ((modal.currentPage * 10) - pmstypeListFilter().length) ) :(modal.currentPage * 10) ) }} of
                {{pmstypeListFilter().length}} items </span>
          </ul>
        </nav>
        <div class="flex justify-end mt-2rem mb-1rem space-x-4">
          <button type="button"
            class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
            data-hs-overlay="#assessment-topics-modal">
            ย้อนกลับ
          </button>
        </div>
      </div>
    </div>
  </div>
</div> -->