import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Component, Inject } from '@angular/core';
import { Validators } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/forms";
import * as i3 from "../../modules/shared/services/shared.service";
import * as i4 from "@angular/material/snack-bar";
import * as i5 from "@angular/common";
import * as i6 from "@angular/material/legacy-card";
import * as i7 from "@angular/material/legacy-form-field";
import * as i8 from "@angular/material/legacy-input";
import * as i9 from "@angular/material/legacy-button";
import * as i10 from "@angular/material/icon";
import * as i11 from "@angular/material/progress-spinner";
import * as i12 from "@angular/material/datepicker";
export class PublishApproveRequestFormComponent {
    constructor(dialogRef, data, fb, sharedService, snackBar) {
        this.dialogRef = dialogRef;
        this.data = data;
        this.fb = fb;
        this.sharedService = sharedService;
        this.snackBar = snackBar;
        this.loading = false;
        this.minDate = new Date();
    }
    ngOnInit() {
        this.initializeForm();
    }
    initializeForm() {
        this.approvalRequestForm = this.fb.group({
            request_name: ['', Validators.required],
            due_date: [null, Validators.required]
        });
    }
    cancelForm() {
        this.dialogRef.close();
    }
    closeDialog() {
        this.dialogRef.close();
    }
    approveAndPublish() {
        if (this.approvalRequestForm.invalid) {
            return;
        }
        this.loading = true;
        const formValue = this.approvalRequestForm.value;
        const payload = {
            request_id: this.data?.demand_id || this.data?.id,
            plan_name: formValue.request_name,
            due_date: formValue.due_date ? new Date(formValue.due_date).toISOString().split('T')[0] : null
        };
        console.log('payload', payload);
        this.sharedService.approveAndPublishMDOApprovalRequests(payload)
            .subscribe({
            next: (res) => {
                this.loading = false;
                this.snackBar.open('Plan approved and published successfully', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-success']
                });
                this.dialogRef.close('success');
            },
            error: (err) => {
                this.loading = false;
                console.error(err);
                const errorMessage = err?.error?.detail ||
                    err?.error?.message ||
                    'Failed to reject request';
                this.snackBar.open(errorMessage, 'X', {
                    duration: 5000,
                    panelClass: ['snackbar-error']
                });
            }
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PublishApproveRequestFormComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.FormBuilder }, { token: i3.SharedService }, { token: i4.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PublishApproveRequestFormComponent, selector: "app-publish-approve-request-form", ngImport: i0, template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n        <div class=\"popup-header\">\n            <div>\n                <div class=\"heading\">Approve & Publish Plan</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]=\"approvalRequestForm\">\n        <mat-card class=\"mt-1\">\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Name of Plan</p>\n                </div>\n                <div class=\"mt-4 additional-details\">\n                    <input type=\"text\" formControlName=\"request_name\" [value]=\"\" placeholder=\"Enter plan name\"\n                        style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:96%;font-size: 14px;font-family: 'Lato';\">\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Timeline (Due Date)</p>\n                </div>\n                <div class=\"section-header mt-4\">\n                    <mat-form-field appearance=\"outline\" class=\"full-width custom-date-field\">\n                        <input matInput [matDatepicker]=\"picker\" formControlName=\"due_date\"\n                            placeholder=\"Select due date\" [min]=\"minDate\">\n\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n                        <mat-datepicker #picker></mat-datepicker>\n                    </mat-form-field>\n                </div>\n            </div>\n\n\n            <!-- <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Upload Document (PDF/Word/Excel/TXT)</p>\n                </div>\n                <div class=\"file-upload-wrapper\">\n                    <label for=\"uploadDoc\" class=\"file-upload-label\">\n                        <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n                        <span>{{ uploadedFile?.name || 'Choose a file (PDF, Word, Excel, TXT)' }}</span>\n                    </label>\n\n                    <small class=\"file-upload-hint\">Max file size: 25MB</small>\n\n                    <input id=\"uploadDoc\" type=\"file\" (change)=\"onFileChange($event)\"\n                        accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n                    <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n                </div>\n            </div> -->\n\n        </mat-card>\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\n            <button [disabled]=\"approvalRequestForm?.invalid\" mat-raised-button\n                [ngClass]=\"approvalRequestForm?.invalid ? 'btn-disable':'approve-btn-footer'\" (click)=\"approveAndPublish()\">\n\n                Approve & Publish\n            </button>\n        </div>\n    </div>\n</div>\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: [".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:.9;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:#444!important;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;margin:0 10px}.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;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:16px;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:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;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:hidden;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:10px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:12px;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}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}::ng-deep .mat-select-panel.search-panel .search-input{flex:1 1 auto;width:100%;padding:8px 10px;border:1px solid rgba(0,0,0,.12);border-radius:4px;font-size:14px;color:#333;outline:none;box-sizing:border-box}::ng-deep .mat-select-panel.search-panel .search-input:focus{border-color:#0074b6;box-shadow:0 0 0 3px #0074b60f}::ng-deep .mat-select-panel.search-panel .clear-button{background:transparent;border:none;cursor:pointer;font-size:16px;color:#666;padding:6px;line-height:1}::ng-deep .mat-select-panel.search-panel .loading-indicator{padding:10px 12px;text-align:center;color:#666;font-size:14px}::ng-deep .mat-select-panel.search-panel .mat-option{padding-top:10px;padding-left:16px}::ng-deep .mat-select-panel.search-panel mat-option[disabled]{padding:8px 16px!important}::ng-deep .mat-select-panel.align-panel{padding:0!important;box-sizing:border-box;margin-left:0!important;min-width:340px!important;max-width:340px!important}::ng-deep .mat-select-panel.align-panel .mat-option{padding-left:16px}::ng-deep .mat-select-panel.search-panel mat-option[disabled] .mat-error,::ng-deep .mat-select-panel.search-panel .mat-error{margin:0!important;padding:0!important;font-size:14px!important;line-height:1.4!important;color:#f44336}::ng-deep .mat-form-field{width:100%}::ng-deep .mat-text-field-wrapper{background:#fff;border-radius:25px!important;height:42px}::ng-deep .mat-notched-outline{border-radius:25px!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:42px;align-items:center;padding:0 16px;background:#fff}::ng-deep .mat-select-panel{border:1px solid rgba(0,0,0,.16);border-radius:8px;box-shadow:0 6px 18px #0000001f}.full-width{width:100%}.date-picker-field ::ng-deep .mat-mdc-text-field-wrapper{border-radius:25px}.approve-btn{background:#1ea84a!important;color:#fff!important;border-radius:10px;padding:0 22px;height:44px;font-size:15px;font-weight:600;box-shadow:none}.approve-btn mat-icon{font-size:20px;margin-right:8px}.approve-btn:hover{background:#16873a!important}.approve-btn:disabled,.approve-btn.mat-mdc-button-disabled,.approve-btn.mat-button-disabled{background:#cfd8dc!important;color:#8a949b!important;cursor:not-allowed!important;opacity:1!important;box-shadow:none!important}.approve-btn:disabled mat-icon,.approve-btn.mat-mdc-button-disabled mat-icon,.approve-btn.mat-button-disabled mat-icon{color:#8a949b!important}.custom-date-field{width:100%}.custom-date-field ::ng-deep .mat-mdc-text-field-wrapper{border-radius:28px!important;background:#fff!important;padding:2px 12px}.custom-date-field ::ng-deep .mdc-notched-outline{display:none!important}.custom-date-field ::ng-deep .mat-mdc-form-field-focus-overlay{display:none!important}.custom-date-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}.approve-btn-footer{background:#1ea84a!important;color:#fff!important;border-radius:26px;padding:0 22px;height:34px;font-size:15px;font-weight:600;box-shadow:none}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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: i7.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "directive", type: i8.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i9.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button],             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],             button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i12.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i12.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i12.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PublishApproveRequestFormComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-publish-approve-request-form', template: "<div class=\"view-cbp-plan\">\n    <div class=\"popup-container\">\n        <div class=\"popup-header\">\n            <div>\n                <div class=\"heading\">Approve & Publish Plan</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]=\"approvalRequestForm\">\n        <mat-card class=\"mt-1\">\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Name of Plan</p>\n                </div>\n                <div class=\"mt-4 additional-details\">\n                    <input type=\"text\" formControlName=\"request_name\" [value]=\"\" placeholder=\"Enter plan name\"\n                        style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:96%;font-size: 14px;font-family: 'Lato';\">\n                </div>\n            </div>\n            <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Timeline (Due Date)</p>\n                </div>\n                <div class=\"section-header mt-4\">\n                    <mat-form-field appearance=\"outline\" class=\"full-width custom-date-field\">\n                        <input matInput [matDatepicker]=\"picker\" formControlName=\"due_date\"\n                            placeholder=\"Select due date\" [min]=\"minDate\">\n\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n                        <mat-datepicker #picker></mat-datepicker>\n                    </mat-form-field>\n                </div>\n            </div>\n\n\n            <!-- <div class=\"mt-2 section\">\n                <div class=\"sub-heading\">\n                    <p>Upload Document (PDF/Word/Excel/TXT)</p>\n                </div>\n                <div class=\"file-upload-wrapper\">\n                    <label for=\"uploadDoc\" class=\"file-upload-label\">\n                        <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n                        <span>{{ uploadedFile?.name || 'Choose a file (PDF, Word, Excel, TXT)' }}</span>\n                    </label>\n\n                    <small class=\"file-upload-hint\">Max file size: 25MB</small>\n\n                    <input id=\"uploadDoc\" type=\"file\" (change)=\"onFileChange($event)\"\n                        accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n                    <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n                </div>\n            </div> -->\n\n        </mat-card>\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\n            <button [disabled]=\"approvalRequestForm?.invalid\" mat-raised-button\n                [ngClass]=\"approvalRequestForm?.invalid ? 'btn-disable':'approve-btn-footer'\" (click)=\"approveAndPublish()\">\n\n                Approve & Publish\n            </button>\n        </div>\n    </div>\n</div>\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: [".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:.9;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:#444!important;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;margin:0 10px}.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;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:16px;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:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:0 8px;justify-content:center;align-items:center;gap:10px;border-radius:32px;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:hidden;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:10px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:12px;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}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}::ng-deep .mat-select-panel.search-panel .search-input{flex:1 1 auto;width:100%;padding:8px 10px;border:1px solid rgba(0,0,0,.12);border-radius:4px;font-size:14px;color:#333;outline:none;box-sizing:border-box}::ng-deep .mat-select-panel.search-panel .search-input:focus{border-color:#0074b6;box-shadow:0 0 0 3px #0074b60f}::ng-deep .mat-select-panel.search-panel .clear-button{background:transparent;border:none;cursor:pointer;font-size:16px;color:#666;padding:6px;line-height:1}::ng-deep .mat-select-panel.search-panel .loading-indicator{padding:10px 12px;text-align:center;color:#666;font-size:14px}::ng-deep .mat-select-panel.search-panel .mat-option{padding-top:10px;padding-left:16px}::ng-deep .mat-select-panel.search-panel mat-option[disabled]{padding:8px 16px!important}::ng-deep .mat-select-panel.align-panel{padding:0!important;box-sizing:border-box;margin-left:0!important;min-width:340px!important;max-width:340px!important}::ng-deep .mat-select-panel.align-panel .mat-option{padding-left:16px}::ng-deep .mat-select-panel.search-panel mat-option[disabled] .mat-error,::ng-deep .mat-select-panel.search-panel .mat-error{margin:0!important;padding:0!important;font-size:14px!important;line-height:1.4!important;color:#f44336}::ng-deep .mat-form-field{width:100%}::ng-deep .mat-text-field-wrapper{background:#fff;border-radius:25px!important;height:42px}::ng-deep .mat-notched-outline{border-radius:25px!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:42px;align-items:center;padding:0 16px;background:#fff}::ng-deep .mat-select-panel{border:1px solid rgba(0,0,0,.16);border-radius:8px;box-shadow:0 6px 18px #0000001f}.full-width{width:100%}.date-picker-field ::ng-deep .mat-mdc-text-field-wrapper{border-radius:25px}.approve-btn{background:#1ea84a!important;color:#fff!important;border-radius:10px;padding:0 22px;height:44px;font-size:15px;font-weight:600;box-shadow:none}.approve-btn mat-icon{font-size:20px;margin-right:8px}.approve-btn:hover{background:#16873a!important}.approve-btn:disabled,.approve-btn.mat-mdc-button-disabled,.approve-btn.mat-button-disabled{background:#cfd8dc!important;color:#8a949b!important;cursor:not-allowed!important;opacity:1!important;box-shadow:none!important}.approve-btn:disabled mat-icon,.approve-btn.mat-mdc-button-disabled mat-icon,.approve-btn.mat-button-disabled mat-icon{color:#8a949b!important}.custom-date-field{width:100%}.custom-date-field ::ng-deep .mat-mdc-text-field-wrapper{border-radius:28px!important;background:#fff!important;padding:2px 12px}.custom-date-field ::ng-deep .mdc-notched-outline{display:none!important}.custom-date-field ::ng-deep .mat-mdc-form-field-focus-overlay{display:none!important}.custom-date-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}.approve-btn-footer{background:#1ea84a!important;color:#fff!important;border-radius:26px;padding:0 22px;height:34px;font-size:15px;font-weight:600;box-shadow:none}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i2.FormBuilder }, { type: i3.SharedService }, { type: i4.MatSnackBar }]; } });
//# sourceMappingURL=data:application/json;base64, 