<div class="header-title-type">
    <div class="flex justify-between">
        <div class="flex">
            <!-- Content ของ div แรก -->
            <!-- <div class="flex gap-x-6">
           <div class="flex items-center">
             <input type="checkbox" class="ti-form-checkbox mt-0.5" id="hs-checkbox-group-1">
             <label for="hs-checkbox-group-1" class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70">0 Selected</label>
           </div>

           <div class="flex items-center">
             <i (click)="toggleCheckbox()" [ngClass]="{'ri-checkbox-multiple-line': !isChecked, 'ri-checkbox-multiple-fill': isChecked}"
             class="ri-checkbox-multiple-line text-gray-500 dark:text-white/70"></i>
             <label for="hs-checkbox-group-2" class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70" (click)="toggleCheckbox()">Select All</label>
         </div>

         </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="Search by No. or Name" 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 href="javascript:void(0);" class="ti-btn ti-btn-soft-success h-10 m-0 shadow-md"
                    data-hs-overlay="#set-idp-development-plan-alert-modal">
                    <i class="ri-save-3-line"></i>
                    Save
                </button>
            </div>
            <div class="px-1">
                <button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
                    <i class="ti ti-book fs-l"></i>
                    Help
                </button>
            </div>
        </div>
    </div>
</div>


<div class="page px-rem">
    <p class="pb-2">ตั้งค่าคะแนนประเมินตัวชี้วัดที่ไม่ติด GAP</p>
    <div class="overflow-auto table-bordered rounded-t-none" style="max-width: 50%;">
        <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
            <div class="overflow-auto shadow-md">
                <table class="ti-custom-table-one ti-custom-table-head" style="border-collapse: collapse; width: 100%; table-layout: auto;">
                    <thead>
                        <tr>
                            <!-- กำหนดให้คอลัมน์ "คะแนน" กว้างกว่า -->
                            <th class="text-base font-bold" style=" width: 23%;height: 40px;">คะแนน</th>
                            <th>5</th>
                            <th>4</th>
                            <th>3</th>
                            <th>2</th>
                            <th>1</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="text-base font-bold" style="height: 70px;">ผ่าน<br>(ไม่ติดGAP)</td>
                            <td><input type="radio" id="idp-radio5" name="score" [value]="5" [(ngModel)]="idpData.score"></td>
                            <td><input type="radio" id="idp-radio4" name="score" [value]="4" [(ngModel)]="idpData.score"></td>
                            <td><input type="radio" id="idp-radio3" name="score" [value]="3" [(ngModel)]="idpData.score"></td>
                            <td><input type="radio" id="idp-radio2" name="score" [value]="2" [(ngModel)]="idpData.score"></td>
                            <td><input type="radio" id="idp-radio1" name="score" [value]="1" [(ngModel)]="idpData.score"></td>
                        </tr>
                        <!-- เพิ่มแถวเพิ่มเติมถ้าต้องการ -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="page px-rem my-5">
    <p class="pb-2">ตารางกำหนดแผนพัฒนา</p>
    <div class="overflow-auto table-bordered rounded-t-md" style="max-width: 70%;">
      <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
          <div class="overflow-auto shadow-md">
              <table class="ti-custom-table ti-custom-table-head">
                  <thead>
                        <tr>
                            <th rowspan="3">จำนวน BI ที่ติด GAP</th>
                            <th colspan="3" style="width: 70%;height: 40px;">เครื่องมือพัฒนา</th>
                        </tr>
                        <tr>
                            <th style="width: 20%;height: 30px;">70</th>
                            <th style="width: 20%;height: 30px;">20</th>
                            <th style="width: 20%;height: 30px;">10</th>
                        </tr>
                        <tr>
                            <th style="width: 20%;height: 60px;">OJT/Job <br>Assignment</th>
                            <th style="width: 20%;height: 60px;">Coach/Mentor</th>
                            <th style="width: 20%;height: 60px;">Training</th>
                        </tr>
                  </thead>
                  <tbody>
                    <tr *ngFor="let item of idpData.developmentPlan; let i = index"  >
                        <td>{{item.planId}}</td>
                        <td><input type="checkbox" [id]="'idp-checkbox'+i+'ojtJobAssignment'" [name]="'developmentPlan'+i" [(ngModel)]="item.ojtJobAssignment"></td>
                        <td><input type="checkbox" [id]="'idp-checkbox'+i+'coachMentor'" [name]="'developmentPlan'+i" [(ngModel)]="item.coachMentor"></td>
                        <td><input type="checkbox" [id]="'idp-checkbox'+i+'training'" [name]="'developmentPlan'+i" [(ngModel)]="item.training"></td>
                    </tr>
                  </tbody>
              </table>
          </div>
      </div>
    </div>
</div>

<div id="set-idp-development-plan-alert-modal" class="hs-overlay hidden ti-modal">
    <div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center">
        <div class="max-h-full overflow-hidden ti-modal-content w-full">
            <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="#set-idp-development-plan-alert-modal">
                        <span class="sr-only">Close</span>
                        <i class="ti ti-circle-x fs-xxl"></i>
                    </button>
                </div>
            </div>
            <div class="ti-modal-body ">
                <p class="mt-1 text-gray-800 dark:text-white/70">
                    ยืนยันการบันทึกข้อมูลหรือไม่
                </p>

                <div class="flex justify-end mt-2rem mb-1rem">
                    <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="#set-idp-development-plan-alert-modal">
                        ย้อนกลับ
                    </button>
                    <a class="ti-btn ti-btn-success" href="javascript:void(0);"
                        data-hs-overlay="#set-idp-development-plan-alert-modal" (click)="saveIdp()">
                        บันทึกข้อมูล
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>