import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Component, Inject, ViewChild } from '@angular/core';
import { EditCbpPlanComponent } from '../edit-cbp-plan/edit-cbp-plan.component';
import { GenerateCourseRecommendationComponent } from '../generate-course-recommendation/generate-course-recommendation.component';
import html2pdf from 'html2pdf.js';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/router";
import * as i3 from "../../modules/shared/services/shared.service";
import * as i4 from "@angular/common";
import * as i5 from "@angular/material/icon";
export class ViewCbpPlanComponent {
    constructor(dialogRef, data, dialog, route, sharedService) {
        this.dialogRef = dialogRef;
        this.data = data;
        this.dialog = dialog;
        this.route = route;
        this.sharedService = sharedService;
        this.selectedValue = '';
        this.searchText = '';
        this.competenciesCount = { total: 0, behavioral: 0, functional: 0, domain: 0 };
        this.fromMdo = false;
        this.planData = data;
        console.log('Received data:', data);
        this.planData.competencies.map((competencies) => {
            this.competenciesCount['total'] = this.competenciesCount['total'] + 1;
            if (competencies.type === 'Behavioral') {
                this.competenciesCount['behavioral'] = this.competenciesCount['behavioral'] + 1;
            }
            if (competencies.type === 'Functional') {
                this.competenciesCount['functional'] = this.competenciesCount['functional'] + 1;
            }
            if (competencies.type === 'Domain') {
                this.competenciesCount['domain'] = this.competenciesCount['domain'] + 1;
            }
        });
    }
    ngOnInit() {
        this.fromMdo = this.sharedService.fromMdoPortal;
    }
    searchData() {
    }
    applyFilter() {
    }
    getCompetenciesByType(competencies, type) {
        return competencies?.filter(c => c.type === type) || [];
    }
    closeDialog() {
        this.dialogRef.close();
    }
    editCBPPlan() {
        let editData;
        if (this.fromMdo && this.sharedService.requestData) {
            editData = { element: this.planData,
                requestData: this.sharedService.requestData
            };
        }
        else {
            editData = this.planData;
        }
        this.dialogRef.close();
        const dialogRefNew = this.dialog.open(EditCbpPlanComponent, {
            width: '1000px',
            data: editData,
            panelClass: 'view-cbp-plan-popup',
            minHeight: '300px',
            maxHeight: '80vh',
            disableClose: true // Optional: prevent closing with outside click
        });
        dialogRefNew.afterClosed().subscribe(result => {
            if (result === 'saved') {
                console.log('Changes saved!');
                // Refresh data or show a toast here
            }
        });
    }
    generateCourseRecommendation() {
        this.dialogRef.close();
        console.log('Generate Course Recommendation clicked', this.planData);
        console.log('Edit Role Mapping clicked', this.planData);
        // Navigate or open modal
        console.log('View CBP Plan clicked', this.planData);
        const dialogRef = this.dialog.open(GenerateCourseRecommendationComponent, {
            width: '1000px',
            data: this.planData,
            panelClass: 'view-cbp-plan-popup',
            minHeight: '400px',
            maxHeight: '90vh',
            disableClose: true // Optional: prevent closing with outside click
        });
        dialogRef.afterClosed().subscribe(result => {
            if (result === 'saved') {
                console.log('Changes saved!');
                // Refresh data or show a toast here
            }
        });
    }
    downloadPDF() {
        const element = this.pdfContent.nativeElement;
        // Wait for images to load
        const images = element.querySelectorAll('img');
        const promises = Array.from(images).map((img) => {
            if (img.complete)
                return Promise.resolve();
            return new Promise(resolve => img.onload = resolve);
        });
        Promise.all(promises).then(() => {
            const options = {
                margin: 0.5,
                filename: 'Role Mapping.pdf',
                image: { type: 'jpeg', quality: 0.98 },
                html2canvas: {
                    scale: 2,
                    useCORS: true,
                    scrollY: 0,
                },
                jsPDF: {
                    unit: 'in',
                    format: 'a4',
                    orientation: 'portrait'
                },
                pagebreak: {
                    mode: ['css', 'legacy', 'avoid-all']
                }
            };
            html2pdf().from(element).set(options).save();
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewCbpPlanComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: i2.ActivatedRoute }, { token: i3.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ViewCbpPlanComponent, selector: "app-view-cbp-plan", viewQueries: [{ propertyName: "pdfContent", first: true, predicate: ["pdfContent"], descendants: true }], ngImport: i0, template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n    <div class=\"popup-header\">\n        <div>\n            <div class=\"heading\">View Role Mapping</div>\n        </div>\n        <div  class=\"cursor-pointer\" (click)=\"closeDialog()\">\n            <mat-icon>close</mat-icon>\n        </div>\n    </div>\n    <div class=\"section-container\"  #pdfContent>\n        \n            <div class=\"section-header mt-4\">\n                <div class=\"designation\">{{planData?.designation_name}}</div>\n            </div>\n\n            <div class=\"competency-container mt-4\">\n                <div class=\"outside-layer-total\">\n                    <div class=\"inside-layer\">\n                        Total Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.total}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-behavioral\">\n                    <div class=\"inside-layer\">\n                        Behavioral Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.behavioral}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-functional\">\n                    <div class=\"inside-layer\">\n                        Functional Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.functional}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-domain\">\n                    <div class=\"inside-layer\">\n                        Domain Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.domain}}\n                    </div>\n                </div>\n            </div>\n            <div class=\"mt-4 section\">\n                <div class=\"sub-heading\">\n                    <p>Wing/Division</p>\n                </div>\n                <div class=\"mt-2\">\n                \n                    <div class=\"wing-text\">{{planData?.wing_division_section}}</div>\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Roles & Responsibilities</p>\n                </div>\n                <div class=\"mt-2 additional-details\">\n                    <p class=\"responsibility-text\" *ngFor=\"let item of planData?.role_responsibilities;let i=index\">\n                       {{i+1}}. {{item}}\n                    </p>\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Activities</p>\n                </div>\n                <div class=\"mt-2 additional-details\">\n                    <p class=\"responsibility-text\" *ngFor=\"let item of planData?.activities;let i=index\">\n                       {{i+1}}. {{item}}\n                    </p>\n                </div>\n            </div>\n            <div class=\"section mt-2\">\n                <div class=\"sub-heading\">\n                    <p>Competency</p>\n                </div>\n               \n                <div class=\"mt-4\">\n                    <div class=\"competency-sub-heading \" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Behavioral')?.length\">Behavioral Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"behavioural-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Behavioral')\">\n                           <span class=\"competency-text-behavioral\"> {{ comp.theme }} - {{ comp.sub_theme }}</span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item behavioural-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Behavioral')\">\n                            <span class=\"competency-text-behavioral\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n                <div class=\"mt-2\">\n                    <div class=\"competency-sub-heading \" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Functional')?.length\">Functional Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"functional-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Functional')\">\n                            <span class=\"competency-text-functional\"> {{ comp.theme }}- {{ comp.sub_theme }} </span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item functional-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Functional')\">\n                            <span class=\"competency-text-functional\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n                <div class=\"mt-2\">\n                    <div class=\"competency-sub-heading\" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Domain')?.length\">Domain Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"domain-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Domain')\">\n                            <span class=\"competency-text-domain\"> {{ comp.theme }} - {{ comp.sub_theme }}</span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item domain-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Domain')\">\n                            <span class=\"competency-text-domain\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n            </div>\n    </div>\n    <div class=\"popup-footer\">\n        <div *ngIf=\"!(data?.fromRequestPage)\">\n            <input class=\"btn-active\" type=\"button\" value=\"Generate Course Recommendation\" (click)=\"generateCourseRecommendation()\"/>\n        </div>\n        <div>\n            <input class=\"btn-active\" type=\"button\" value=\"Download\" (click)=\"downloadPDF()\"/>\n        </div>\n        <div *ngIf=\"!(data?.fromRequestPage) || (fromMdo && data?.requestStatus.toLowerCase() === 'pending')\">\n            <input class=\"btn-active\" type=\"button\" value=\"Edit\" (click)=\"editCBPPlan()\"/>\n        </div>\n    </div>\n</div>\n</div>", styles: [".container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0;padding:5px 10px}.functional-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0;padding:5px 10px}.domain-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0;padding:5px 10px}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.designation{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.wing-text{color:#1b4ca1;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.responsibility-text{color:#1b4ca1;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:1.75}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewCbpPlanComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-view-cbp-plan', template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n    <div class=\"popup-header\">\n        <div>\n            <div class=\"heading\">View Role Mapping</div>\n        </div>\n        <div  class=\"cursor-pointer\" (click)=\"closeDialog()\">\n            <mat-icon>close</mat-icon>\n        </div>\n    </div>\n    <div class=\"section-container\"  #pdfContent>\n        \n            <div class=\"section-header mt-4\">\n                <div class=\"designation\">{{planData?.designation_name}}</div>\n            </div>\n\n            <div class=\"competency-container mt-4\">\n                <div class=\"outside-layer-total\">\n                    <div class=\"inside-layer\">\n                        Total Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.total}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-behavioral\">\n                    <div class=\"inside-layer\">\n                        Behavioral Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.behavioral}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-functional\">\n                    <div class=\"inside-layer\">\n                        Functional Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.functional}}\n                    </div>\n                </div>\n                <div class=\"outside-layer-domain\">\n                    <div class=\"inside-layer\">\n                        Domain Competencies\n                    </div>\n                    <div class=\"count\">\n                        {{competenciesCount?.domain}}\n                    </div>\n                </div>\n            </div>\n            <div class=\"mt-4 section\">\n                <div class=\"sub-heading\">\n                    <p>Wing/Division</p>\n                </div>\n                <div class=\"mt-2\">\n                \n                    <div class=\"wing-text\">{{planData?.wing_division_section}}</div>\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Roles & Responsibilities</p>\n                </div>\n                <div class=\"mt-2 additional-details\">\n                    <p class=\"responsibility-text\" *ngFor=\"let item of planData?.role_responsibilities;let i=index\">\n                       {{i+1}}. {{item}}\n                    </p>\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Activities</p>\n                </div>\n                <div class=\"mt-2 additional-details\">\n                    <p class=\"responsibility-text\" *ngFor=\"let item of planData?.activities;let i=index\">\n                       {{i+1}}. {{item}}\n                    </p>\n                </div>\n            </div>\n            <div class=\"section mt-2\">\n                <div class=\"sub-heading\">\n                    <p>Competency</p>\n                </div>\n               \n                <div class=\"mt-4\">\n                    <div class=\"competency-sub-heading \" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Behavioral')?.length\">Behavioral Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"behavioural-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Behavioral')\">\n                           <span class=\"competency-text-behavioral\"> {{ comp.theme }} - {{ comp.sub_theme }}</span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item behavioural-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Behavioral')\">\n                            <span class=\"competency-text-behavioral\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n                <div class=\"mt-2\">\n                    <div class=\"competency-sub-heading \" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Functional')?.length\">Functional Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"functional-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Functional')\">\n                            <span class=\"competency-text-functional\"> {{ comp.theme }}- {{ comp.sub_theme }} </span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item functional-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Functional')\">\n                            <span class=\"competency-text-functional\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n                <div class=\"mt-2\">\n                    <div class=\"competency-sub-heading\" *ngIf=\"getCompetenciesByType(planData?.competencies, 'Domain')?.length\">Domain Competencies</div>\n                    <!-- <ul class=\"competency-list mt-2\">\n                        <li class=\"domain-pill\" *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Domain')\">\n                            <span class=\"competency-text-domain\"> {{ comp.theme }} - {{ comp.sub_theme }}</span>\n                          </li>\n                    </ul> -->\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item domain-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType(planData?.competencies, 'Domain')\">\n                            <span class=\"competency-text-domain\">\n                                {{ comp.theme }} - {{ comp.sub_theme }}\n                            </span>\n                            <!-- <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n                                <mat-icon>close</mat-icon>\n                            </span> -->\n                        </div>\n                    </div>\n                </div>\n            </div>\n    </div>\n    <div class=\"popup-footer\">\n        <div *ngIf=\"!(data?.fromRequestPage)\">\n            <input class=\"btn-active\" type=\"button\" value=\"Generate Course Recommendation\" (click)=\"generateCourseRecommendation()\"/>\n        </div>\n        <div>\n            <input class=\"btn-active\" type=\"button\" value=\"Download\" (click)=\"downloadPDF()\"/>\n        </div>\n        <div *ngIf=\"!(data?.fromRequestPage) || (fromMdo && data?.requestStatus.toLowerCase() === 'pending')\">\n            <input class=\"btn-active\" type=\"button\" value=\"Edit\" (click)=\"editCBPPlan()\"/>\n        </div>\n    </div>\n</div>\n</div>", styles: [".container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0;padding:5px 10px}.functional-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0;padding:5px 10px}.domain-pill{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0;padding:5px 10px}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.designation{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.wing-text{color:#1b4ca1;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.responsibility-text{color:#1b4ca1;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:1.75}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i1.MatDialog }, { type: i2.ActivatedRoute }, { type: i3.SharedService }]; }, propDecorators: { pdfContent: [{
                type: ViewChild,
                args: ['pdfContent', { static: false }]
            }] } });
//# sourceMappingURL=data:application/json;base64, 