import { Component, Inject } from '@angular/core';
import { Validators } from '@angular/forms';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "../../modules/shared/services/shared.service";
import * as i3 from "@angular/forms";
import * as i4 from "@angular/material/snack-bar";
import * as i5 from "@angular/common/http";
import * as i6 from "@angular/common";
import * as i7 from "@angular/material/legacy-form-field";
import * as i8 from "@angular/material/legacy-input";
import * as i9 from "@angular/material/icon";
import * as i10 from "@angular/material/legacy-select";
import * as i11 from "@angular/material/legacy-core";
import * as i12 from "@angular/material/progress-spinner";
export class AddCourseComponent {
    constructor(dialogRef, data, sharedService, fb, snackBar, http, cdRef) {
        this.dialogRef = dialogRef;
        this.data = data;
        this.sharedService = sharedService;
        this.fb = fb;
        this.snackBar = snackBar;
        this.http = http;
        this.cdRef = cdRef;
        this.loading = false;
        // Enhanced competency selection properties
        this.competenciesData = [];
        this.availableThemes = [];
        this.availableSubThemes = [];
        this.filteredThemes = [];
        this.filteredSubThemes = [];
        this.selectedCompetencyType = '';
        this.selectedTheme = '';
        this.selectedSubTheme = '';
        this.manualTheme = '';
        this.manualSubTheme = '';
        this.themeSearchText = '';
        this.subThemeSearchText = '';
        this.competenciesCount = { total: 0, behavioral: 0, functional: 0, domain: 0 };
        // Prefill properties
        this.isCompetencyPrefilled = false;
        this.prefilledCompetencyType = '';
        this.prefilledTheme = '';
        this.prefilledSubTheme = '';
        this.planData = data;
        this.initializeForm();
    }
    ngOnInit() {
        this.loadCompetenciesData();
        this.updateCompetencyCounts();
        this.checkForPrefilledData();
    }
    checkForPrefilledData() {
        console.log('=== CheckForPrefilledData ===');
        console.log('Full data object:', this.data);
        if (this.data && this.data.prefillCompetency) {
            console.log('✅ Prefill competency data found:', this.data.prefillCompetency);
            this.isCompetencyPrefilled = true;
            this.prefilledCompetencyType = this.data.prefillCompetency.type;
            this.prefilledTheme = this.data.prefillCompetency.theme;
            this.prefilledSubTheme = this.data.prefillCompetency.subTheme || '';
            console.log('Processed prefill data:', {
                isCompetencyPrefilled: this.isCompetencyPrefilled,
                prefilledCompetencyType: this.prefilledCompetencyType,
                prefilledTheme: this.prefilledTheme,
                prefilledSubTheme: this.prefilledSubTheme
            });
            // Set the competency type and trigger the theme loading
            this.selectedCompetencyType = this.prefilledCompetencyType;
            this.courseForm.patchValue({
                competencyType: this.prefilledCompetencyType
            });
            console.log('Form updated with competency type:', this.prefilledCompetencyType);
            // For Domain competencies, set manual theme and subtheme inputs and auto-add
            if (this.prefilledCompetencyType === 'Domain') {
                console.log('Setting Domain manual inputs...');
                this.courseForm.patchValue({
                    manualThemeInput: this.prefilledTheme,
                    manualSubThemeInput: this.prefilledSubTheme
                });
                console.log('Domain form values set:', {
                    manualThemeInput: this.prefilledTheme,
                    manualSubThemeInput: this.prefilledSubTheme
                });
                // Auto-add the domain competency
                setTimeout(() => {
                    console.log('Adding prefilled Domain competency...');
                    this.addPrefilledCompetency();
                }, 100);
            }
            else {
                console.log('Will handle Behavioral/Functional after competencies data loads...');
                // For Behavioral/Functional, wait for competencies data to load
                // The theme and subtheme will be set in loadCompetenciesData after data is available
            }
        }
        else {
            console.log('❌ No prefill competency data found');
            console.log('data.prefillCompetency:', this.data?.prefillCompetency);
        }
    }
    loadCompetenciesData() {
        this.sharedService.getCompetencyJson().subscribe({
            next: (data) => {
                this.competenciesData = data;
                console.log('Competencies data loaded:', this.competenciesData);
                // Handle prefilled data after competencies are loaded
                if (this.isCompetencyPrefilled && this.prefilledCompetencyType !== 'Domain') {
                    this.handlePrefilledBehavioralFunctional();
                }
            },
            error: (error) => {
                console.error('Error loading competencies data:', error);
            }
        });
    }
    handlePrefilledBehavioralFunctional() {
        console.log('=== HandlePrefilledBehavioralFunctional ===');
        console.log('Prefilled competency type:', this.prefilledCompetencyType);
        console.log('Prefilled theme:', this.prefilledTheme);
        console.log('Prefilled subTheme:', this.prefilledSubTheme);
        // Load themes for the prefilled competency type
        this.onCompetencyTypeChange(this.prefilledCompetencyType);
        // Find and set the theme if it exists in the data
        setTimeout(() => {
            console.log('Available themes:', this.availableThemes);
            const matchingTheme = this.availableThemes.find(theme => theme.name.toLowerCase() === this.prefilledTheme.toLowerCase());
            console.log('Matching theme found:', matchingTheme);
            if (matchingTheme) {
                this.selectedTheme = matchingTheme.name;
                this.courseForm.patchValue({
                    competencyTheme: matchingTheme.name
                });
                this.onThemeChange(matchingTheme.name);
                console.log('Theme set successfully:', matchingTheme.name);
                // If subTheme is provided, try to set it after themes are loaded
                if (this.prefilledSubTheme) {
                    setTimeout(() => {
                        console.log('Available subThemes:', this.availableSubThemes);
                        const matchingSubTheme = this.availableSubThemes.find(subTheme => subTheme.toLowerCase() === this.prefilledSubTheme.toLowerCase());
                        console.log('Matching subTheme found:', matchingSubTheme);
                        if (matchingSubTheme) {
                            this.selectedSubTheme = matchingSubTheme;
                            this.courseForm.patchValue({
                                competencySubTheme: matchingSubTheme
                            });
                            console.log('SubTheme set successfully:', matchingSubTheme);
                        }
                        else {
                            console.log('⚠️ SubTheme not found in available options');
                        }
                        // Add the prefilled competency with the specified theme and sub-theme
                        setTimeout(() => {
                            console.log('Adding prefilled competency with theme and subtheme...');
                            this.addPrefilledCompetency();
                        }, 100);
                    }, 300);
                }
                else {
                    // Automatically add the prefilled competency with just the theme
                    setTimeout(() => {
                        console.log('Adding prefilled competency with theme only...');
                        this.addPrefilledCompetency();
                    }, 200);
                }
            }
            else {
                console.log('⚠️ Theme not found in available options');
            }
        }, 100);
    }
    addPrefilledCompetency() {
        // For prefilled competencies, use the theme name as the sub-theme
        // This ensures the competency gap is addressed
        const exists = this.competenciesArray.value.some(c => c.theme === this.prefilledTheme && c.type === this.prefilledCompetencyType);
        if (!exists) {
            const newComp = this.fb.group({
                type: [this.prefilledCompetencyType],
                theme: [this.prefilledTheme],
                sub_theme: [this.prefilledTheme] // Use theme as sub_theme for gap filling
            });
            this.competenciesArray.push(newComp);
            this.updateCompetencyCounts();
            this.cdRef.detectChanges();
            console.log('Auto-added prefilled competency:', {
                type: this.prefilledCompetencyType,
                theme: this.prefilledTheme,
                sub_theme: this.prefilledTheme
            });
        }
    }
    initializeForm() {
        this.courseForm = this.fb.group({
            courseName: ['', Validators.required],
            summary: [''],
            platformName: ['', Validators.required],
            courseUrl: ['', Validators.required],
            competencyType: [''],
            competencyTheme: [''],
            competencySubTheme: [''],
            manualThemeInput: [''],
            manualSubThemeInput: [''],
            themeSearch: [''],
            subThemeSearch: [''],
            competencies: this.fb.array([])
        });
        // Listen to form changes to trigger validation updates
        this.courseForm.valueChanges.subscribe(() => {
            this.cdRef.detectChanges();
        });
    }
    cancelForm() {
        this.dialogRef.close();
    }
    get competenciesArray() {
        return this.courseForm.get('competencies');
    }
    updateCompetencyCounts() {
        const comps = this.competenciesArray.value;
        this.competenciesCount = { total: 0, behavioral: 0, functional: 0, domain: 0 };
        comps.forEach(c => {
            this.competenciesCount.total++;
            if (c.type.toLowerCase() === 'behavioral')
                this.competenciesCount.behavioral++;
            if (c.type.toLowerCase() === 'functional')
                this.competenciesCount.functional++;
            if (c.type.toLowerCase() === 'domain')
                this.competenciesCount.domain++;
        });
    }
    onCompetencyTypeChange(type) {
        this.selectedCompetencyType = type;
        this.selectedTheme = '';
        this.selectedSubTheme = '';
        this.manualTheme = '';
        this.manualSubTheme = '';
        this.availableThemes = [];
        this.availableSubThemes = [];
        this.filteredThemes = [];
        this.filteredSubThemes = [];
        this.themeSearchText = '';
        this.subThemeSearchText = '';
        // Reset form controls
        this.courseForm.patchValue({
            competencyTheme: '',
            competencySubTheme: '',
            manualThemeInput: '',
            manualSubThemeInput: '',
            themeSearch: '',
            subThemeSearch: ''
        });
        if (type === 'Behavioral' || type === 'Functional') {
            // Load themes from JSON for Behavioral and Functional
            const competencyCategory = this.competenciesData.find(cat => cat.name.toLowerCase() === type.toLowerCase() ||
                (type === 'Behavioral' && cat.name === 'Behavioural'));
            if (competencyCategory) {
                this.availableThemes = competencyCategory.competency_theme || [];
                this.filteredThemes = [...this.availableThemes];
            }
        }
        // For Domain, no themes are loaded - user will enter manually
    }
    onThemeChange(themeName) {
        this.selectedTheme = themeName;
        this.selectedSubTheme = '';
        this.availableSubThemes = [];
        this.filteredSubThemes = [];
        this.subThemeSearchText = '';
        this.courseForm.patchValue({
            competencySubTheme: '',
            subThemeSearch: ''
        });
        // Find the selected theme and load its sub-themes
        const selectedThemeObj = this.availableThemes.find(theme => theme.name === themeName);
        if (selectedThemeObj) {
            this.availableSubThemes = selectedThemeObj.competency_sub_theme || [];
            this.filteredSubThemes = [...this.availableSubThemes];
        }
    }
    onSubThemeChange(subThemeName) {
        this.selectedSubTheme = subThemeName;
    }
    filterThemes(searchText) {
        this.themeSearchText = searchText;
        if (!searchText.trim()) {
            this.filteredThemes = [...this.availableThemes];
        }
        else {
            this.filteredThemes = this.availableThemes.filter(theme => theme.name.toLowerCase().includes(searchText.toLowerCase()));
        }
    }
    filterSubThemes(searchText) {
        this.subThemeSearchText = searchText;
        if (!searchText.trim()) {
            this.filteredSubThemes = [...this.availableSubThemes];
        }
        else {
            this.filteredSubThemes = this.availableSubThemes.filter(subTheme => subTheme.toLowerCase().includes(searchText.toLowerCase()));
        }
    }
    addCompetency() {
        let type = this.selectedCompetencyType;
        let theme = '';
        let subTheme = '';
        if (type === 'Domain') {
            // For Domain, use manual input
            theme = this.courseForm.value.manualThemeInput?.trim();
            subTheme = this.courseForm.value.manualSubThemeInput?.trim();
        }
        else {
            // For Behavioral/Functional, use dropdown selections
            theme = this.selectedTheme;
            subTheme = this.selectedSubTheme;
        }
        if (type && theme && subTheme) {
            const exists = this.competenciesArray.value.some(c => c.theme === theme && c.sub_theme === subTheme && c.type === type);
            if (!exists) {
                const newComp = this.fb.group({
                    type: [type],
                    theme: [theme],
                    sub_theme: [subTheme]
                });
                this.competenciesArray.push(newComp);
            }
            // Clear input fields after adding
            this.resetCompetencyForm();
        }
        const currentValues = this.competenciesArray.value;
        this.courseForm.patchValue({ competencies: [...currentValues] });
        this.updateCompetencyCounts();
        this.cdRef.detectChanges(); // Trigger validation update
        console.log(this.courseForm?.get('competencies')?.value);
    }
    resetCompetencyForm() {
        this.selectedCompetencyType = '';
        this.selectedTheme = '';
        this.selectedSubTheme = '';
        this.manualTheme = '';
        this.manualSubTheme = '';
        this.availableThemes = [];
        this.availableSubThemes = [];
        this.filteredThemes = [];
        this.filteredSubThemes = [];
        this.themeSearchText = '';
        this.subThemeSearchText = '';
        this.courseForm.patchValue({
            competencyType: '',
            competencyTheme: '',
            competencySubTheme: '',
            manualThemeInput: '',
            manualSubThemeInput: '',
            themeSearch: '',
            subThemeSearch: ''
        });
    }
    canAddCompetency() {
        if (!this.selectedCompetencyType)
            return false;
        if (this.selectedCompetencyType === 'Domain') {
            const theme = this.courseForm.value.manualThemeInput?.trim();
            const subTheme = this.courseForm.value.manualSubThemeInput?.trim();
            return !!(theme && subTheme);
        }
        else {
            return !!(this.selectedTheme && this.selectedSubTheme);
        }
    }
    canSaveCourse() {
        // Check if required fields are filled
        const courseName = this.courseForm.value.courseName?.trim();
        const platformName = this.courseForm.value.platformName?.trim();
        const courseUrl = this.courseForm.value.courseUrl?.trim();
        // Check if at least one competency is added
        const hasCompetencies = this.competenciesArray.length > 0;
        return !!(courseName && platformName && courseUrl && hasCompetencies);
    }
    getCompetenciesByType(type) {
        return (this.courseForm?.get('competencies')?.value || []).filter(c => c.type === type);
    }
    deleteCompetency(comp) {
        const index = this.competenciesArray.controls.findIndex(control => control.value.theme === comp.theme && control.value.type === comp.type);
        if (index !== -1) {
            this.competenciesArray.removeAt(index);
        }
        this.updateCompetencyCounts();
        this.cdRef.detectChanges(); // Trigger validation update
    }
    saveCourse() {
        this.loading = true;
        // Transform competencies to the required API format
        const competencies = this.competenciesArray.value.map(comp => ({
            "competencyAreaName": comp.type,
            "competencyThemeName": comp.theme,
            "competencySubThemeName": comp.sub_theme
        }));
        let reqBody = {
            "role_mapping_id": this.planData.id,
            "name": this.courseForm.value.courseName,
            "platform": this.courseForm.value.platformName,
            "public_link": this.courseForm.value.courseUrl,
            "rationale": this.courseForm.value.summary,
            "competencies": competencies
        };
        console.log('Request body:', reqBody);
        // this.sharedService.addUserCourse(reqBody).subscribe(()=>{
        //   this.loading = false
        //   this.snackBar.open('Course Added Successfully', 'X', {
        //     duration: 3000,
        //     panelClass: ['snackbar-success']
        //   });
        // })
        this.sharedService.addUserCourse(reqBody).subscribe({
            next: () => {
                this.loading = false;
                this.snackBar.open('Course Added Successfully', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-success']
                });
            },
            error: (error) => {
                this.loading = false;
                this.snackBar.open(error?.error?.detail, 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-error']
                });
            }
        });
        this.dialogRef.close('saved');
    }
    closeDialog() {
        this.dialogRef.close();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddCourseComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.SharedService }, { token: i3.FormBuilder }, { token: i4.MatSnackBar }, { token: i5.HttpClient }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AddCourseComponent, selector: "app-add-course", ngImport: i0, template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n        <div class=\"popup-header\">\n            <div>\n                <div class=\"heading\">Add Course</div>\n            </div>\n            <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n                <mat-icon>close</mat-icon>\n            </div>\n        </div>\n    </div>\n    <div class=\"section-container\" [formGroup]=\"courseForm\">\n\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Course Name</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Course Name\" formControlName=\"courseName\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Summary / Rationale:</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <textarea class=\"custom-textarea\" formControlName=\"summary\" rows=\"5\" placeholder=\"Enter Summary\"\n                    [value]=\"\"></textarea>\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Platform Name</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Platform Name\" formControlName=\"platformName\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Course URL</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Course Url\" formControlName=\"courseUrl\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n\n\n\n\n\n        <div class=\"mt-2 section\">\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=\"sub-heading mt-4\">\n                <p>Competency</p>\n            </div>\n            <div class=\"enhanced-competency-section mt-4\">\n                <!-- Step 1: Select Competency Type -->\n                <div class=\"competency-step\">\n                    <label class=\"step-label\">1. Select Core Competency Type</label>\n                    <div class=\"competency-dropdown-container\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencyType\"\n                                    placeholder=\"Select Competency Type\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n                                <mat-option value=\"Behavioral\">Behavioural</mat-option>\n                                <mat-option value=\"Functional\">Functional</mat-option>\n                                <mat-option value=\"Domain\">Domain</mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Core competency type is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n                <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n                    <label class=\"step-label\">2. Select/Enter Theme</label>\n\n                    <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n                    <div class=\"competency-dropdown-container\"\n                         *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencyTheme\"\n                                    placeholder=\"Search and select theme\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onThemeChange($event.value)\">\n                                <!-- Search input inside dropdown -->\n                                <mat-option class=\"search-option\" disabled>\n                                    <mat-form-field appearance=\"outline\" class=\"search-field\">\n                                        <input matInput\n                                               placeholder=\"Search themes...\"\n                                               formControlName=\"themeSearch\"\n                                               (input)=\"filterThemes($event.target.value)\"\n                                               (click)=\"$event.stopPropagation()\"\n                                               (keydown)=\"$event.stopPropagation()\">\n                                    </mat-form-field>\n                                </mat-option>\n\n                                <!-- Theme options -->\n                                <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n                                    {{theme.name}}\n                                </mat-option>\n\n                                <!-- No results message -->\n                                <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n                                    No themes found matching \"{{themeSearchText}}\"\n                                </mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n\n                    <!-- For Domain: Manual input -->\n                    <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n                        <input type=\"text\"\n                               formControlName=\"manualThemeInput\"\n                               placeholder=\"Enter Theme manually\"\n                               [disabled]=\"isCompetencyPrefilled\"\n                               class=\"manual-input\" />\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Step 3: Sub-theme Selection -->\n                <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n                    <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n                    <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n                    <div class=\"competency-dropdown-container\"\n                         *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencySubTheme\"\n                                    placeholder=\"Search and select sub-theme\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onSubThemeChange($event.value)\">\n                                <!-- Search input inside dropdown -->\n                                <mat-option class=\"search-option\" disabled>\n                                    <mat-form-field appearance=\"outline\" class=\"search-field\">\n                                        <input matInput\n                                               placeholder=\"Search sub-themes...\"\n                                               formControlName=\"subThemeSearch\"\n                                               (input)=\"filterSubThemes($event.target.value)\"\n                                               (click)=\"$event.stopPropagation()\"\n                                               (keydown)=\"$event.stopPropagation()\">\n                                    </mat-form-field>\n                                </mat-option>\n\n                                <!-- Sub-theme options -->\n                                <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n                                    {{subTheme}}\n                                </mat-option>\n\n                                <!-- No results message -->\n                                <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n                                    No sub-themes found matching \"{{subThemeSearchText}}\"\n                                </mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Sub-theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n\n                    <!-- For Domain: Manual input -->\n                    <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n                        <input type=\"text\"\n                               formControlName=\"manualSubThemeInput\"\n                               placeholder=\"Enter Sub-theme manually\"\n                               [disabled]=\"isCompetencyPrefilled\"\n                               class=\"manual-input\" />\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Sub-theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Add Button -->\n                <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType\">\n                    <button type=\"button\"\n                            class=\"add-competency-btn\"\n                            [disabled]=\"!canAddCompetency()\"\n                            [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\"\n                            (click)=\"addCompetency()\">\n                        Add Competency\n                    </button>\n                </div>\n            </div>\n            <div class=\"mt-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n                    Behavioral Competencies\n                </div>\n\n                <div class=\"competency-grid mt-2\">\n                    <div class=\"competency-item behavioural-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType('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-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n                    Functional Competencies</div>\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item functional-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType('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-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Domain')?.length\">Domain Competencies</div>\n                <div class=\"competency-grid mt-2\">\n                    <div class=\"competency-item domain-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType('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>\n            <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n        </div>\n        <div>\n            <input [class]=\"canSaveCourse() ? 'btn-active' : 'btn-disable'\" \n                   type=\"button\" \n                   value=\"Save\" \n                   [disabled]=\"!canSaveCourse()\"\n                   (click)=\"canSaveCourse() && saveCourse()\" />\n        </div>\n    </div>\n</div>\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;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:#000;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;gap:10px}.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:flex-start;flex-direction:row;flex-wrap:wrap;gap:32px;width:100%;overflow-x:auto}@media (max-width: 768px){.competency-container{flex-direction:column;align-items:stretch;gap:12px}.outside-layer-total,.outside-layer-behavioral,.outside-layer-functional,.outside-layer-domain{width:100%;justify-content:space-between}}@media (max-width: 1024px) and (min-width: 769px){.competency-container{gap:6px}.outside-layer-total,.outside-layer-behavioral,.outside-layer-functional,.outside-layer-domain{padding:3px 8px;gap:12px}.inside-layer{font-size:16px}.count{font-size:20px}}.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;margin:0;flex-shrink:0;width:20%}.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;flex-shrink:0;width:20%}.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;flex-shrink:0;width:20%}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0;flex-shrink:0;width:20%}.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;padding:2px 8px;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}.functional-pill{display:flex;padding:2px 8px;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}.domain-pill{display:flex;padding:2px 8px;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}.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;padding:5px}.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}.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}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.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}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;border:1px solid #ccc;cursor:not-allowed;opacity:.7;box-shadow:none}.prefill-info{margin-top:8px;padding:8px 12px;background:#1b4ca10d;border:1px solid rgba(27,76,161,.2);border-radius:8px}.prefill-info .text-muted{color:#6c757d;font-family:Lato;font-size:12px;display:flex;align-items:center;gap:6px}.prefill-info .text-muted .info-icon{font-size:16px;color:#1b4ca1}.competency-dropdown[disabled] ::ng-deep .mat-form-field-flex{opacity:.7}.competency-dropdown[disabled] ::ng-deep .mat-select{color:#6c757d!important}.manual-input:disabled{background:#f8f9fa!important;border-color:#e9ecef!important;color:#6c757d!important;opacity:.7;cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i7.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatLegacySelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatLegacyOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i12.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddCourseComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-add-course', template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n        <div class=\"popup-header\">\n            <div>\n                <div class=\"heading\">Add Course</div>\n            </div>\n            <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n                <mat-icon>close</mat-icon>\n            </div>\n        </div>\n    </div>\n    <div class=\"section-container\" [formGroup]=\"courseForm\">\n\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Course Name</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Course Name\" formControlName=\"courseName\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Summary / Rationale:</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <textarea class=\"custom-textarea\" formControlName=\"summary\" rows=\"5\" placeholder=\"Enter Summary\"\n                    [value]=\"\"></textarea>\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Platform Name</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Platform Name\" formControlName=\"platformName\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n        <div class=\"mt-2 section\">\n            <div class=\"sub-heading\">\n                <p>Course URL</p>\n            </div>\n            <div class=\"mt-4 additional-details\">\n                <input type=\"text\" placeholder=\"Enter Course Url\" formControlName=\"courseUrl\" [value]=\"\"\n                    style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n            </div>\n        </div>\n\n\n\n\n\n        <div class=\"mt-2 section\">\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=\"sub-heading mt-4\">\n                <p>Competency</p>\n            </div>\n            <div class=\"enhanced-competency-section mt-4\">\n                <!-- Step 1: Select Competency Type -->\n                <div class=\"competency-step\">\n                    <label class=\"step-label\">1. Select Core Competency Type</label>\n                    <div class=\"competency-dropdown-container\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencyType\"\n                                    placeholder=\"Select Competency Type\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n                                <mat-option value=\"Behavioral\">Behavioural</mat-option>\n                                <mat-option value=\"Functional\">Functional</mat-option>\n                                <mat-option value=\"Domain\">Domain</mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Core competency type is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n                <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n                    <label class=\"step-label\">2. Select/Enter Theme</label>\n\n                    <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n                    <div class=\"competency-dropdown-container\"\n                         *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencyTheme\"\n                                    placeholder=\"Search and select theme\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onThemeChange($event.value)\">\n                                <!-- Search input inside dropdown -->\n                                <mat-option class=\"search-option\" disabled>\n                                    <mat-form-field appearance=\"outline\" class=\"search-field\">\n                                        <input matInput\n                                               placeholder=\"Search themes...\"\n                                               formControlName=\"themeSearch\"\n                                               (input)=\"filterThemes($event.target.value)\"\n                                               (click)=\"$event.stopPropagation()\"\n                                               (keydown)=\"$event.stopPropagation()\">\n                                    </mat-form-field>\n                                </mat-option>\n\n                                <!-- Theme options -->\n                                <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n                                    {{theme.name}}\n                                </mat-option>\n\n                                <!-- No results message -->\n                                <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n                                    No themes found matching \"{{themeSearchText}}\"\n                                </mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n\n                    <!-- For Domain: Manual input -->\n                    <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n                        <input type=\"text\"\n                               formControlName=\"manualThemeInput\"\n                               placeholder=\"Enter Theme manually\"\n                               [disabled]=\"isCompetencyPrefilled\"\n                               class=\"manual-input\" />\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Step 3: Sub-theme Selection -->\n                <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n                    <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n                    <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n                    <div class=\"competency-dropdown-container\"\n                         *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n                        <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n                            <mat-select formControlName=\"competencySubTheme\"\n                                    placeholder=\"Search and select sub-theme\"\n                                    [disabled]=\"isCompetencyPrefilled\"\n                                    (selectionChange)=\"onSubThemeChange($event.value)\">\n                                <!-- Search input inside dropdown -->\n                                <mat-option class=\"search-option\" disabled>\n                                    <mat-form-field appearance=\"outline\" class=\"search-field\">\n                                        <input matInput\n                                               placeholder=\"Search sub-themes...\"\n                                               formControlName=\"subThemeSearch\"\n                                               (input)=\"filterSubThemes($event.target.value)\"\n                                               (click)=\"$event.stopPropagation()\"\n                                               (keydown)=\"$event.stopPropagation()\">\n                                    </mat-form-field>\n                                </mat-option>\n\n                                <!-- Sub-theme options -->\n                                <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n                                    {{subTheme}}\n                                </mat-option>\n\n                                <!-- No results message -->\n                                <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n                                    No sub-themes found matching \"{{subThemeSearchText}}\"\n                                </mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Sub-theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n\n                    <!-- For Domain: Manual input -->\n                    <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n                        <input type=\"text\"\n                               formControlName=\"manualSubThemeInput\"\n                               placeholder=\"Enter Sub-theme manually\"\n                               [disabled]=\"isCompetencyPrefilled\"\n                               class=\"manual-input\" />\n                        <div *ngIf=\"isCompetencyPrefilled\" class=\"prefill-info\">\n                            <small class=\"text-muted\">\n                                <mat-icon class=\"info-icon\">info</mat-icon>\n                                Sub-theme is pre-selected based on gap analysis\n                            </small>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Add Button -->\n                <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType\">\n                    <button type=\"button\"\n                            class=\"add-competency-btn\"\n                            [disabled]=\"!canAddCompetency()\"\n                            [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\"\n                            (click)=\"addCompetency()\">\n                        Add Competency\n                    </button>\n                </div>\n            </div>\n            <div class=\"mt-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n                    Behavioral Competencies\n                </div>\n\n                <div class=\"competency-grid mt-2\">\n                    <div class=\"competency-item behavioural-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType('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-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n                    Functional Competencies</div>\n                    <div class=\"competency-grid mt-2\">\n                        <div class=\"competency-item functional-pill\"\n                            *ngFor=\"let comp of getCompetenciesByType('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-4\">\n                <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Domain')?.length\">Domain Competencies</div>\n                <div class=\"competency-grid mt-2\">\n                    <div class=\"competency-item domain-pill\"\n                        *ngFor=\"let comp of getCompetenciesByType('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>\n            <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n        </div>\n        <div>\n            <input [class]=\"canSaveCourse() ? 'btn-active' : 'btn-disable'\" \n                   type=\"button\" \n                   value=\"Save\" \n                   [disabled]=\"!canSaveCourse()\"\n                   (click)=\"canSaveCourse() && saveCourse()\" />\n        </div>\n    </div>\n</div>\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;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:#000;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;gap:10px}.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:flex-start;flex-direction:row;flex-wrap:wrap;gap:32px;width:100%;overflow-x:auto}@media (max-width: 768px){.competency-container{flex-direction:column;align-items:stretch;gap:12px}.outside-layer-total,.outside-layer-behavioral,.outside-layer-functional,.outside-layer-domain{width:100%;justify-content:space-between}}@media (max-width: 1024px) and (min-width: 769px){.competency-container{gap:6px}.outside-layer-total,.outside-layer-behavioral,.outside-layer-functional,.outside-layer-domain{padding:3px 8px;gap:12px}.inside-layer{font-size:16px}.count{font-size:20px}}.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;margin:0;flex-shrink:0;width:20%}.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;flex-shrink:0;width:20%}.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;flex-shrink:0;width:20%}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0;flex-shrink:0;width:20%}.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;padding:2px 8px;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}.functional-pill{display:flex;padding:2px 8px;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}.domain-pill{display:flex;padding:2px 8px;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}.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;padding:5px}.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}.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}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.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}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;border:1px solid #ccc;cursor:not-allowed;opacity:.7;box-shadow:none}.prefill-info{margin-top:8px;padding:8px 12px;background:#1b4ca10d;border:1px solid rgba(27,76,161,.2);border-radius:8px}.prefill-info .text-muted{color:#6c757d;font-family:Lato;font-size:12px;display:flex;align-items:center;gap:6px}.prefill-info .text-muted .info-icon{font-size:16px;color:#1b4ca1}.competency-dropdown[disabled] ::ng-deep .mat-form-field-flex{opacity:.7}.competency-dropdown[disabled] ::ng-deep .mat-select{color:#6c757d!important}.manual-input:disabled{background:#f8f9fa!important;border-color:#e9ecef!important;color:#6c757d!important;opacity:.7;cursor:not-allowed}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i2.SharedService }, { type: i3.FormBuilder }, { type: i4.MatSnackBar }, { type: i5.HttpClient }, { type: i0.ChangeDetectorRef }]; } });
//# sourceMappingURL=data:application/json;base64, 