import { Component, ViewChild } from '@angular/core';
import { UploadDialogComponent } from './upload-dialog/upload-dialog.component';
import { FormControl, Validators } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table';
import { ListPopupComponent } from '../../components/list-popup/list-popup.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "../shared/services/shared.service";
import * as i3 from "@angular/material/snack-bar";
import * as i4 from "@angular/forms";
import * as i5 from "@angular/router";
import * as i6 from "@angular/common";
import * as i7 from "@angular/material/legacy-card";
import * as i8 from "@angular/material/legacy-button";
import * as i9 from "@angular/material/icon";
import * as i10 from "@angular/material/progress-spinner";
import * as i11 from "@angular/material/table";
import * as i12 from "@angular/material/paginator";
import * as i13 from "@angular/material/tooltip";
export class UploadDocumentPageComponent {
    constructor(dialog, sharedService, snackBar, fb, router) {
        this.dialog = dialog;
        this.sharedService = sharedService;
        this.snackBar = snackBar;
        this.fb = fb;
        this.router = router;
        this.dataSource = new MatTableDataSource([]);
        this.selectedMinistryType = 'ministry';
        this.ministryData = [];
        this.ministryFullData = [];
        this.disableBtn = true;
        this.sectorData = [
            {
                value: 'Women and child development'
            },
            {
                value: 'Rural development'
            },
            {
                value: 'Urban development'
            },
            {
                value: 'Healthcare'
            },
            {
                value: 'Agriculture'
            },
            {
                value: 'Others'
            }
        ];
        this.searchText = '';
        this.displayedColumns = ['name', 'document_type', 'summary_status', 'date', 'actions'];
        this.cbpFinalObj = {};
        this.departmentData = [];
        this.documents = [
        // {
        //   name: 'Work Allocation',
        //   originalName: 'ACBP_Ministry_of_Women_and_Child_Development_Extract...',
        //   size: 4.5,
        //   date: 'Oct 13, 2025'
        // },
        // {
        //   name: 'Screenshot 2025-10-08 at 12',
        //   originalName: 'Screenshot 2025-10-08 at 12.54.18 PM.png',
        //   size: 331.8,
        //   date: 'Oct 13, 2025'
        // }
        ];
        this.loading = false;
        this.filteredMinistryData = [];
        this.searchControl = new FormControl('');
        this.panelOpen = false;
        this.departmentPanelOpen = false;
        this.filteredList = [];
        this.filteredDepartmentList = [];
        this.loginUserOrgIds = [];
        this.originalMinistryData = [];
        this.showSampleDialogFlag = false;
        this.roleMappingForm = this.fb.group({
            ministryType: ['ministry', Validators.required],
            ministry: [null, Validators.required],
            sectors: [[]],
            departments: [[]]
        });
        // this.cbpFinalObj = this.sharedService.getCBPPlanLocalStorage()
        this.getMinistryData();
    }
    ngOnInit() {
        this.cbpPlanFinalObj = this.sharedService.getCBPPlanLocalStorage();
        console.log('cbpFinalObj--', this.cbpFinalObj);
        this.searchControl.valueChanges.subscribe(searchText => {
            if (searchText) {
                this.filterMinistryData(searchText);
            }
            else {
                this.filteredMinistryData = this.ministryData;
            }
        });
        this.sharedService.summaryTriggerExecuted.subscribe((data) => {
            if (data && data?.file_id) {
                this.getUploadedDocuments();
            }
        });
        if (this.cbpPlanFinalObj && this.cbpPlanFinalObj.ministry && this.cbpPlanFinalObj.ministry.identifier) {
            this.getUploadedDocuments();
        }
    }
    ngAfterViewInit() {
        this.dataSource.paginator = this.paginator;
    }
    getUploadedDocuments() {
        let reqBody = {
            state_center_id: this.cbpPlanFinalObj?.ministry?.identifier,
            include_summary: true,
            skip: 0,
            limit: 200
        };
        if (this.cbpPlanFinalObj && this.cbpPlanFinalObj?.departments) {
            reqBody['department_id'] = this.cbpPlanFinalObj?.departments;
        }
        this.loading = true;
        this.sharedService.getUploadedDocuments(reqBody).subscribe((res) => {
            if (res && res?.items && res?.items?.length) {
                this.loading = false;
                this.documents = res?.items;
                this.dataSource.data = this.documents;
                console.log('this.documents', this.documents);
            }
            else {
                this.loading = false;
            }
        });
    }
    openUploadDialog() {
        const dialogRef = this.dialog.open(UploadDialogComponent, {
            width: '600px',
            data: '',
            disableClose: true,
            maxHeight: '80vh',
        });
        dialogRef.afterClosed().subscribe(result => {
            if (result === 'close') {
                this.getUploadedDocuments();
            }
            // if (result) {
            //   this.documents.push(result);
            // }
        });
    }
    filteredDocuments() {
        // console.log('this.documents', this.documents)
        return this.documents.filter(doc => doc.filename.toLowerCase().includes(this.searchText.toLowerCase()));
    }
    deleteDocument(docToDelete) {
        this.documents = this.documents.filter(doc => doc !== docToDelete);
        this.loading = true;
        this.sharedService.deleteSummary(docToDelete?.file_id).subscribe((res) => {
            if (res) {
                this.sharedService.deleteFile(docToDelete?.file_id).subscribe((dres) => {
                    this.loading = true;
                    if (dres) {
                        this.loading = false;
                        this.snackBar.open('Document Deleted Successfully', 'X', {
                            duration: 3000,
                            panelClass: ['snackbar-success']
                        });
                        this.getUploadedDocuments();
                    }
                    else {
                        this.loading = false;
                        this.snackBar.open('Error While Deleting Document', 'X', {
                            duration: 3000,
                            panelClass: ['snackbar-error']
                        });
                        this.getUploadedDocuments();
                    }
                });
                this.loading = false;
                this.snackBar.open('Document Summary Deleted Successfully', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-success']
                });
            }
            else {
                this.loading = false;
                this.snackBar.open('Error While Deleting Document Summary', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-error']
                });
            }
        });
    }
    applyFilter() {
    }
    onMinistryTypeChange(event) {
        this.roleMappingForm.reset();
        // console.log('event', event)
        this.getMinistryData();
        this.sharedService.cbpPlanFinalObj['ministryType'] = event.value;
        localStorage.setItem('cbpPlanFinalObj', JSON.stringify(this.sharedService.cbpPlanFinalObj));
        this.selectedMinistryType = event?.value;
        this.roleMappingForm.get('sectors')?.setValue([]);
        this.roleMappingForm.controls.ministryType.setValue(this.selectedMinistryType);
    }
    onMinistryChange(event) {
        const selectedMinistryId = event.value;
        // console.log('Selected Ministry ID:', selectedMinistryId);
        // You can access the selected object if needed
        const selectedMinistry = this.ministryData.find(item => item.identifier === selectedMinistryId);
        console.log('Selected Ministry:', selectedMinistry);
        ``;
        this.sharedService.cbpPlanFinalObj['ministry'] = { identifier: selectedMinistryId?.identifier, name: selectedMinistryId?.orgName };
        if (selectedMinistryId && this.selectedMinistryType === 'state') {
            this.sharedService.getDepartmentList(selectedMinistryId).subscribe((res) => {
                this.departmentData = res;
            });
        }
        if (this.selectedMinistryType === 'state') {
            this.sharedService.cbpPlanFinalObj['ministryType'] = this.roleMappingForm.controls.ministryType.value;
            this.sharedService.cbpPlanFinalObj['ministry'] = { identifier: selectedMinistry?.identifier, name: selectedMinistry?.orgName };
            this.sharedService.cbpPlanFinalObj['departments'] = this.roleMappingForm.controls.departments.value;
            this.sharedService.cbpPlanFinalObj['sectors'] = this.roleMappingForm.controls.sectors.value;
        }
        else {
            this.sharedService.cbpPlanFinalObj['ministryType'] = this.roleMappingForm.controls.ministryType.value;
            this.sharedService.cbpPlanFinalObj['ministry'] = { identifier: selectedMinistry?.identifier, name: selectedMinistry?.orgName };
        }
        console.log('this.sharedService.cbpPlanFinalObj', this.sharedService.cbpPlanFinalObj);
        localStorage.setItem('cbpPlanFinalObj', JSON.stringify(this.sharedService.cbpPlanFinalObj));
        console.log('this.roleMappingForm', this.roleMappingForm);
    }
    filterMinistryData(searchText) {
        if (searchText) {
            console.log('searhTect, ', searchText);
            const search = searchText?.trim().toLowerCase() || '';
            this.filteredMinistryData = !search
                ? [...this.ministryData]
                : this.ministryData.filter(item => item.orgName?.trim().toLowerCase().startsWith(search));
        }
    }
    getMinistryData() {
        this.loading = true;
        this.sharedService.getMinistryData(this.selectedMinistryType).subscribe((data) => {
            this.loading = false;
            console.log('data--', data);
            this.ministryFullData = data;
            this.ministryData = [];
            if (this.selectedMinistryType === 'ministry') {
                data.forEach((item) => {
                    if (item?.sbOrgType === 'ministry') {
                        this.ministryData.push(item);
                        this.filteredMinistryData = [...this.ministryData];
                    }
                });
            }
            else if (this.selectedMinistryType === 'state') {
                data.forEach((item) => {
                    if (item?.sbOrgType === 'state') {
                        this.ministryData.push(item);
                        this.filteredMinistryData = [...this.ministryData];
                    }
                });
            }
            this.getUserProfileData();
        });
        console.log('this.ministryData--', this.ministryData);
        console.log('this.filteredMinistryData--', this.filteredMinistryData);
    }
    routeToMain() {
        this.router.navigate(['/']);
    }
    viewSummary(doc) {
        const dialogRef = this.dialog.open(ListPopupComponent, {
            width: '800px',
            data: { element: doc, type: 'doc-summary' },
            disableClose: true,
            maxHeight: '80vh'
        });
        dialogRef.afterClosed().subscribe(() => {
            // No need to do anything special here to reset inline expanded state
            // Because you're using dialog, not inline expand – view remains in initial (collapsed) state
        });
    }
    downloadDoc(doc) {
        this.loading = true;
        this.sharedService.downloadFile(doc.file_id).subscribe({
            next: (blob) => {
                this.loading = false;
                const url = window.URL.createObjectURL(blob);
                const a = document.createElement('a');
                a.href = url;
                a.download = `${doc?.filename}`; // Use dynamic name if needed
                a.click();
                window.URL.revokeObjectURL(url);
                // ✅ Success feedback
                this.snackBar.open('File downloaded successfully!', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-success']
                });
            },
            error: (err) => {
                this.loading = false;
                // ❌ Error feedback
                console.error('Download error:', err);
                this.snackBar.open('Failed to download the file.', 'X', {
                    duration: 3000,
                    panelClass: ['snackbar-error']
                });
            }
        });
    }
    onOpened(opened) {
        this.panelOpen = opened;
    }
    onOpenedDepartment(opened) {
        this.departmentPanelOpen = opened;
    }
    filterData(event) {
        if (event && event.target && event.target.value) {
            const s = event.target.value.toLowerCase();
            this.filteredList = this.ministryData.filter(x => x.orgName.toLowerCase().includes(s));
        }
        else {
            this.filteredList = this.ministryData;
        }
    }
    filterDepartmentData(event) {
        if (event && event.target && event.target.value) {
            const s = event.target.value.toLowerCase();
            this.filteredDepartmentList = this.departmentData.filter(x => x.orgName.toLowerCase().includes(s));
        }
        else {
            this.filteredDepartmentList = this.departmentData;
        }
    }
    getUserProfileData() {
        this.sharedService.getUserProfile().subscribe((data) => {
            console.log('data--', data);
            this.loginUserOrgIds = data?.organization_ids;
            let filteredMinistryData = [];
            console.log('this.ministryFullData--', this.ministryFullData);
            this.ministryFullData.map((item) => {
                if (this.loginUserOrgIds.indexOf(item?.identifier) > -1) {
                    filteredMinistryData.push(item);
                }
            });
            this.ministryData = filteredMinistryData;
            this.originalMinistryData = filteredMinistryData;
            this.filteredList = filteredMinistryData;
            console.log('this.filteredList--', this.filteredList);
        });
    }
    routeToInitial() {
        this.router.navigate(['/initial']);
    }
    showSampleDialog() {
        this.showSampleDialogFlag = true;
    }
    downloadSampleDocx() {
    }
    downloadSamplePdf() {
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UploadDocumentPageComponent, deps: [{ token: i1.MatDialog }, { token: i2.SharedService }, { token: i3.MatSnackBar }, { token: i4.FormBuilder }, { token: i5.Router }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UploadDocumentPageComponent, selector: "app-upload-document-page", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"upload-container\">\n    <div class=\"header\">\n        <div class=\"sub-heading mt-10 cursor-pointer\">\n            <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n                    class=\"pl-10\">Back to Role Mapping Generation</span></p>\n        </div>\n\n    </div>\n    <mat-card class=\"mat-card-container\" [formGroup]=\"roleMappingForm\">\n        <div class=\"header\">\n            <div class=\"sub-heading\">\n                <p>CBP Document Library</p>\n            </div>\n\n\n        </div>\n        <div class=\"edit-section mt-4\">\n            <div class=\"select-map-route-container\">\n                <div class=\"select-map-flex-container\">\n                    <div class=\"select-map-flex\">\n                        <div class=\"selected-mapping-route\">\n                            <p>{{cbpPlanFinalObj?.ministry?.orgName}} <span *ngIf=\"cbpPlanFinalObj?.department_name\">\n                                    / {{cbpPlanFinalObj?.department_name}}</span>\n                            </p>\n                        </div>\n                        <div class=\"edit-plan cursor-pointer\" (click)=\"routeToInitial()\">\n                            <mat-icon>edit</mat-icon>Edit\n                        </div>\n                        <!--                            <div class=\"cursor-pointer ml-10\">-->\n                        <!--                                <button class=\"btn-active cursor-pointer\" (click)=\"moveToInitialScreenLayout('add')\">-->\n                        <!--                                    <mat-icon>add</mat-icon>-->\n                        <!--                                    Create New CBP-->\n                        <!--                                </button>-->\n                        <!--                            </div>-->\n                    </div>\n                    <div class=\"flex flex-row\">\n                        <div>\n                            <button class=\"btn-active-sample\"\n                                mat-raised-button color=\"primary\" [disabled]=\"!(cbpPlanFinalObj?.ministry?.orgName)\"\n                                (click)=\"showSampleDialog()\">\n                                <mat-icon>description</mat-icon> Sample Format\n                            </button>\n                        </div>\n                        <div class=\"ml-5\">\n                            <button [ngClass]=\"!(cbpPlanFinalObj?.ministry?.orgName) ? 'btn-disable':'btn-active'\"\n                                mat-raised-button color=\"primary\" [disabled]=\"!(cbpPlanFinalObj?.ministry?.orgName)\"\n                                (click)=\"openUploadDialog()\">\n                                <mat-icon>upload</mat-icon> Upload Document\n                            </button>\n                        </div>\n                    </div>\n\n                </div>\n            </div>\n        </div>\n\n\n\n\n\n    </mat-card>\n    <mat-card class=\"\">\n        <div class=\"sub-heading\">\n            <p>Uploaded Documents (Max. 10 Documents are allowed)</p>\n        </div>\n        <div class=\"search flex margin-right-m\">\n            <div class=\"mt-10\">\n                <div class=\"search-container\">\n                    <div class=\"rsearch\">\n                        <mat-icon\n                            class=\"color-60 search-icon mat-icon notranslate material-icons mat-icon-no-color\">search</mat-icon>\n                        <input class=\"sinput color-60 w-full\" [(ngModel)]=\"searchText\" label=\"\" (input)=\"applyFilter()\"\n                            placeholder=\"Search Documents\" type=\"Standard\">\n                        <mat-icon *ngIf=\"searchText.trim().length > 0\"\n                            class=\"color-60 clear-icon mat-icon notranslate material-icons mat-icon-no-color cursor-pointer\"\n                            (click)=\"clearSearch()\">clear</mat-icon>\n                    </div>\n\n                </div>\n\n\n\n            </div>\n        </div>\n        <p class=\"mt-10\" style=\"font-family: 'Lato'; font-size: 18px; margin-left: 10px;\">\n            {{filteredDocuments()?.length}} Documents</p>\n        <table style=\"border-radius: 25px 25px 0 0;\n        overflow: hidden;\n        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.12);\" mat-table [dataSource]=\"filteredDocuments()\"\n            class=\"mat-elevation-z2 full-width-table mt-10\">\n\n            <!-- Document Column -->\n            <ng-container matColumnDef=\"name\">\n                <th mat-header-cell *matHeaderCellDef> Document </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <div>\n                        <div class=\"doc-title\" *ngIf=\"doc.document_name\">{{ doc.filename }}</div>\n                        <div class=\"doc-title\" *ngIf=\"!doc.document_name\">{{ doc.filename }}</div>\n                    </div>\n                </td>\n            </ng-container>\n\n            <!-- Document Column -->\n            <ng-container matColumnDef=\"document_type\">\n                <th mat-header-cell *matHeaderCellDef> Document Type</th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <div>\n                        <div class=\"doc-title\" *ngIf=\"doc.document_type\">{{ doc.document_type }}</div>\n                        <div class=\"doc-title\" *ngIf=\"!doc.document_type\">N/A</div>\n                    </div>\n                </td>\n            </ng-container>\n\n            <!-- Summary Status Column -->\n            <ng-container matColumnDef=\"summary_status\">\n                <th mat-header-cell *matHeaderCellDef> Summary Status </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <span *ngIf=\"doc.summary_status === 'COMPLETED'\" class=\"success\"> {{ doc.summary_status | titlecase\n                        }} </span>\n                    <span *ngIf=\"doc.summary_status !== 'COMPLETED'\" class=\"in-progress\"> {{ doc.summary_status |\n                        titlecase }} </span>\n                </td>\n            </ng-container>\n\n            <!-- Summary Text Column -->\n            <!-- <ng-container matColumnDef=\"summary_text\">\n                <th mat-header-cell *matHeaderCellDef> Summary </th>\n                <td mat-cell *matCellDef=\"let doc\">\n                    <div class=\"doc-summary-text\" style=\"width: 80%;\">\n                        <markdown [data]=\"doc?.summary_text | slice : 0 : 200\"></markdown>\n                    </div>\n                </td>\n            </ng-container> -->\n\n            <!-- Date Column -->\n            <ng-container matColumnDef=\"date\">\n                <th mat-header-cell *matHeaderCellDef> Date </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\"> {{ doc.created_at | date: 'MMM d, y'}} </td>\n            </ng-container>\n\n            <!-- Actions Column -->\n            <ng-container matColumnDef=\"actions\">\n                <th mat-header-cell *matHeaderCellDef> Actions </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <button mat-icon-button color=\"primary\" (click)=\"downloadDoc(doc)\" matTooltip=\"Download\">\n                        <mat-icon>download</mat-icon>\n                    </button>\n\n                    <button style=\"margin-left: 15px;\" *ngIf=\"doc.summary_status === 'COMPLETED'\" mat-icon-button\n                        color=\"primary\" (click)=\"viewSummary(doc)\" matTooltip=\"View Summary\">\n                        <mat-icon>visibility</mat-icon>\n                    </button>\n\n                    <button style=\"margin-left: 15px;\"  mat-icon-button\n                        color=\"warn\" (click)=\"deleteDocument(doc)\" matTooltip=\"Delete\">\n                        <mat-icon>delete</mat-icon>\n                    </button>\n                </td>\n            </ng-container>\n\n            <!-- Header and Row Definitions -->\n            <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n            <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n\n            <!-- No Data Message -->\n\n        </table>\n        <div *ngIf=\"filteredDocuments().length === 0\" class=\"no-data-message\">\n            No record found\n        </div>\n        <!-- Pagination -->\n        <div class=\"mt-10\">\n            <mat-paginator [pageSize]=\"5\" [pageSizeOptions]=\"[5, 10, 20]\"></mat-paginator>\n        </div>\n\n\n    </mat-card>\n</div>\n\n\n\n<!-- Overlay -->\n<div class=\"popup-overlay\" *ngIf=\"showSampleDialogFlag\">\n\n  <!-- Popup -->\n  <div class=\"sample-popup\">\n\n    <!-- Header -->\n    <div class=\"popup-header\">\n      <div class=\"title-section\">\n        <div class=\"title-icon\">\n          <mat-icon>description</mat-icon>\n        </div>\n\n        <div>\n          <p class=\"heading\">Download Sample Document</p>\n\n          <p>\n            Use these sample templates as a reference for preparing your\n            designation & role mapping document.\n          </p>\n        </div>\n      </div>\n\n      <button mat-icon-button class=\"close-btn\" (click)=\"showSampleDialogFlag = false\">\n        <mat-icon>close</mat-icon>\n      </button>\n    </div>\n\n    <!-- Card 1 -->\n    <div class=\"document-card\">\n\n      <div class=\"doc-left\">\n\n        <div class=\"doc-icon blue\">\n          <mat-icon>description</mat-icon>\n        </div>\n\n        <div class=\"doc-content\">\n          <div class=\"doc-title\">Sample Work Allocation order structure</div>\n\n          <div class=\"doc-subtitle\">\n            .docx \u00B7 Editable template\n          </div>\n        </div>\n\n      </div>\n\n       <a\n    href=\"assets/sample-documents/Draft Template_Input Document_AI-CBP Tool (19052026).docx\"\n    download\n    class=\"download-btn\">\n\n    <mat-icon>download</mat-icon>\n\n  </a>\n\n    </div>\n\n    <!-- Card 2 -->\n    <div class=\"document-card\">\n\n      <div class=\"doc-left\">\n\n        <div class=\"doc-icon red\">\n          <mat-icon>picture_as_pdf</mat-icon>\n        </div>\n\n        <div class=\"doc-content\">\n          <div class=\"doc-title\">Sample work allocation order document</div>\n\n          <div class=\"doc-subtitle\">\n            .pdf \u00B7 Reference format\n          </div>\n        </div>\n\n      </div>\n\n        <a\n    href=\"assets/sample-documents/MPTB-English.pdf\"\n    download\n    class=\"download-btn\">\n\n    <mat-icon>download</mat-icon>\n\n  </a>\n\n    </div>\n\n    <!-- Note -->\n    <div class=\"note-box\">\n      <span class=\"note-label\">Note:</span>\n      Please make sure the uploadable document is in\n      <b>PDF format</b> only. Maximum file size:\n      <b>25 MB</b>.\n    </div>\n\n    <!-- Footer -->\n    <div class=\"popup-footer\">\n      <button\n        class=\"close-footer-btn\"\n        (click)=\"showSampleDialogFlag = false\">\n        Close\n      </button>\n    </div>\n\n  </div>\n</div>\n\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: [".header{display:flex;flex-direction:row;justify-content:space-between}.primary-btn{background-color:#1b4ca1;color:#fff}.mat-card-container{background:transparent;padding:25px;margin:25px 0}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;font-size:20px;left:10px}.search .clear-icon{position:absolute;top:15px;font-size:20px;right:10px;color:#666}.search .clear-icon:hover{color:#333}.search .sinput{border-radius:32px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato;width:800px}.no-data-message{text-align:center;padding:16px;font-style:italic;color:#888}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-sample{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #eee);color:var(--white-kb-white-100, #000);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.ml-10{margin-left:10px}.mt-10{margin-top:10px}.cursor-pointer{cursor:pointer}.doc-title{font-weight:700}:host ::ng-deep .mat-mdc-header-row{position:sticky;top:0;z-index:10;background:#fff;font-size:16px;box-shadow:0 2px 4px #0000001a;padding:5px 10px}:host ::ng-deep .mat-mdc-row{font-size:16px}:host ::ng-deep .mat-mdc-cell{padding:5px 10px}:host ::ng-deep .mat-mdc-header-cell{background:#fff;font-weight:600;font-size:18px;border-bottom:2px solid #e0e0e0}:host ::ng-deep th.mat-mdc-header-cell:not(:last-child){position:relative;border-right:none;padding:5px 10px}:host ::ng-deep th.mat-mdc-header-cell:not(:last-child):after{content:\"\";position:absolute;top:12px;bottom:12px;right:0;width:1px;background-color:#e0e0e0}::ng-deep .doc-summary-text ::ng-deep markdown p{line-height:1.5rem;font-family:Lato;font-size:1rem!important;font-style:normal;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}.edit-plan{display:flex;padding:4px 10px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:17px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px;height:30px}.select-map-route-container{display:flex;flex-direction:row;width:100%}.select-map-flex{display:flex;flex-direction:row}.select-map-flex-container{display:flex;justify-content:space-between;width:100%}.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}.success{background:green;padding:4px 6px;color:#fff;border-radius:20px}.in-progress{background:orange;padding:4px 6px;color:#fff;border-radius:20px}.flex{display:flex}.flex-row{flex-direction:row}.ml-5{margin-left:5px}.sample-btn{border-radius:28px;padding:0 18px;height:44px;font-weight:600;display:flex;align-items:center;gap:8px}.popup-overlay{position:fixed;inset:0;background:#00000073;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;z-index:9999}.sample-popup{width:550px;background:#fff;border-radius:18px;padding:24px;box-shadow:0 10px 40px #0000002e;animation:popupFade .2s ease}@keyframes popupFade{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.popup-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:22px}.title-section{display:flex;gap:14px}.title-section .heading{margin:0;font-size:18px;font-weight:700;color:#1e293b}.title-section p{margin:8px 0 0;font-size:14px;line-height:22px;color:#64748b}.title-icon{width:25px;height:24px;min-width:42px;border-radius:12px;background:#e8f0ff;display:flex;align-items:center;justify-content:center}.title-icon mat-icon{color:#2563eb;font-size:22px}.close-btn{margin-top:-6px}.close-btn mat-icon{color:#64748b}.document-card{border:1px solid #e5e7eb;border-radius:16px;padding:16px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;transition:all .2s ease}.document-card:hover{border-color:#cbd5e1;background:#fafafa}.doc-left{display:flex;align-items:center;gap:14px}.doc-icon{width:32px;height:32px;border-radius:12px;display:flex;align-items:center;justify-content:center}.doc-icon mat-icon{font-size:18px}.doc-icon.blue{background:#e8f0ff}.doc-icon.blue mat-icon{color:#2563eb}.doc-icon.red{background:#ffe9e9}.doc-icon.red mat-icon{color:#dc2626}.doc-content .doc-title{font-size:14px;font-weight:700;color:#111827;margin-bottom:4px}.doc-content .doc-subtitle{font-size:14px;color:#6b7280}.note-box{background:#fff8e7;border:1px solid #f4cf70;border-radius:14px;padding:14px 16px;color:#92400e;font-size:14px;line-height:22px;margin-top:8px}.note-box .note-label{font-weight:700}.popup-footer{display:flex;justify-content:flex-end;margin-top:22px}.close-footer-btn{border-radius:12px;min-width:90px;height:42px;font-weight:400;border:none!important}.download-btn{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#64748b;text-decoration:none;transition:all .2s ease}.download-btn:hover{background:#f1f5f9;color:#111827}.download-btn mat-icon{font-size:22px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.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: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i10.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i12.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UploadDocumentPageComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-upload-document-page', template: "<div class=\"upload-container\">\n    <div class=\"header\">\n        <div class=\"sub-heading mt-10 cursor-pointer\">\n            <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n                    class=\"pl-10\">Back to Role Mapping Generation</span></p>\n        </div>\n\n    </div>\n    <mat-card class=\"mat-card-container\" [formGroup]=\"roleMappingForm\">\n        <div class=\"header\">\n            <div class=\"sub-heading\">\n                <p>CBP Document Library</p>\n            </div>\n\n\n        </div>\n        <div class=\"edit-section mt-4\">\n            <div class=\"select-map-route-container\">\n                <div class=\"select-map-flex-container\">\n                    <div class=\"select-map-flex\">\n                        <div class=\"selected-mapping-route\">\n                            <p>{{cbpPlanFinalObj?.ministry?.orgName}} <span *ngIf=\"cbpPlanFinalObj?.department_name\">\n                                    / {{cbpPlanFinalObj?.department_name}}</span>\n                            </p>\n                        </div>\n                        <div class=\"edit-plan cursor-pointer\" (click)=\"routeToInitial()\">\n                            <mat-icon>edit</mat-icon>Edit\n                        </div>\n                        <!--                            <div class=\"cursor-pointer ml-10\">-->\n                        <!--                                <button class=\"btn-active cursor-pointer\" (click)=\"moveToInitialScreenLayout('add')\">-->\n                        <!--                                    <mat-icon>add</mat-icon>-->\n                        <!--                                    Create New CBP-->\n                        <!--                                </button>-->\n                        <!--                            </div>-->\n                    </div>\n                    <div class=\"flex flex-row\">\n                        <div>\n                            <button class=\"btn-active-sample\"\n                                mat-raised-button color=\"primary\" [disabled]=\"!(cbpPlanFinalObj?.ministry?.orgName)\"\n                                (click)=\"showSampleDialog()\">\n                                <mat-icon>description</mat-icon> Sample Format\n                            </button>\n                        </div>\n                        <div class=\"ml-5\">\n                            <button [ngClass]=\"!(cbpPlanFinalObj?.ministry?.orgName) ? 'btn-disable':'btn-active'\"\n                                mat-raised-button color=\"primary\" [disabled]=\"!(cbpPlanFinalObj?.ministry?.orgName)\"\n                                (click)=\"openUploadDialog()\">\n                                <mat-icon>upload</mat-icon> Upload Document\n                            </button>\n                        </div>\n                    </div>\n\n                </div>\n            </div>\n        </div>\n\n\n\n\n\n    </mat-card>\n    <mat-card class=\"\">\n        <div class=\"sub-heading\">\n            <p>Uploaded Documents (Max. 10 Documents are allowed)</p>\n        </div>\n        <div class=\"search flex margin-right-m\">\n            <div class=\"mt-10\">\n                <div class=\"search-container\">\n                    <div class=\"rsearch\">\n                        <mat-icon\n                            class=\"color-60 search-icon mat-icon notranslate material-icons mat-icon-no-color\">search</mat-icon>\n                        <input class=\"sinput color-60 w-full\" [(ngModel)]=\"searchText\" label=\"\" (input)=\"applyFilter()\"\n                            placeholder=\"Search Documents\" type=\"Standard\">\n                        <mat-icon *ngIf=\"searchText.trim().length > 0\"\n                            class=\"color-60 clear-icon mat-icon notranslate material-icons mat-icon-no-color cursor-pointer\"\n                            (click)=\"clearSearch()\">clear</mat-icon>\n                    </div>\n\n                </div>\n\n\n\n            </div>\n        </div>\n        <p class=\"mt-10\" style=\"font-family: 'Lato'; font-size: 18px; margin-left: 10px;\">\n            {{filteredDocuments()?.length}} Documents</p>\n        <table style=\"border-radius: 25px 25px 0 0;\n        overflow: hidden;\n        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.12);\" mat-table [dataSource]=\"filteredDocuments()\"\n            class=\"mat-elevation-z2 full-width-table mt-10\">\n\n            <!-- Document Column -->\n            <ng-container matColumnDef=\"name\">\n                <th mat-header-cell *matHeaderCellDef> Document </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <div>\n                        <div class=\"doc-title\" *ngIf=\"doc.document_name\">{{ doc.filename }}</div>\n                        <div class=\"doc-title\" *ngIf=\"!doc.document_name\">{{ doc.filename }}</div>\n                    </div>\n                </td>\n            </ng-container>\n\n            <!-- Document Column -->\n            <ng-container matColumnDef=\"document_type\">\n                <th mat-header-cell *matHeaderCellDef> Document Type</th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <div>\n                        <div class=\"doc-title\" *ngIf=\"doc.document_type\">{{ doc.document_type }}</div>\n                        <div class=\"doc-title\" *ngIf=\"!doc.document_type\">N/A</div>\n                    </div>\n                </td>\n            </ng-container>\n\n            <!-- Summary Status Column -->\n            <ng-container matColumnDef=\"summary_status\">\n                <th mat-header-cell *matHeaderCellDef> Summary Status </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <span *ngIf=\"doc.summary_status === 'COMPLETED'\" class=\"success\"> {{ doc.summary_status | titlecase\n                        }} </span>\n                    <span *ngIf=\"doc.summary_status !== 'COMPLETED'\" class=\"in-progress\"> {{ doc.summary_status |\n                        titlecase }} </span>\n                </td>\n            </ng-container>\n\n            <!-- Summary Text Column -->\n            <!-- <ng-container matColumnDef=\"summary_text\">\n                <th mat-header-cell *matHeaderCellDef> Summary </th>\n                <td mat-cell *matCellDef=\"let doc\">\n                    <div class=\"doc-summary-text\" style=\"width: 80%;\">\n                        <markdown [data]=\"doc?.summary_text | slice : 0 : 200\"></markdown>\n                    </div>\n                </td>\n            </ng-container> -->\n\n            <!-- Date Column -->\n            <ng-container matColumnDef=\"date\">\n                <th mat-header-cell *matHeaderCellDef> Date </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\"> {{ doc.created_at | date: 'MMM d, y'}} </td>\n            </ng-container>\n\n            <!-- Actions Column -->\n            <ng-container matColumnDef=\"actions\">\n                <th mat-header-cell *matHeaderCellDef> Actions </th>\n                <td mat-cell *matCellDef=\"let doc\" style=\"width: 15%;\">\n                    <button mat-icon-button color=\"primary\" (click)=\"downloadDoc(doc)\" matTooltip=\"Download\">\n                        <mat-icon>download</mat-icon>\n                    </button>\n\n                    <button style=\"margin-left: 15px;\" *ngIf=\"doc.summary_status === 'COMPLETED'\" mat-icon-button\n                        color=\"primary\" (click)=\"viewSummary(doc)\" matTooltip=\"View Summary\">\n                        <mat-icon>visibility</mat-icon>\n                    </button>\n\n                    <button style=\"margin-left: 15px;\"  mat-icon-button\n                        color=\"warn\" (click)=\"deleteDocument(doc)\" matTooltip=\"Delete\">\n                        <mat-icon>delete</mat-icon>\n                    </button>\n                </td>\n            </ng-container>\n\n            <!-- Header and Row Definitions -->\n            <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n            <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n\n            <!-- No Data Message -->\n\n        </table>\n        <div *ngIf=\"filteredDocuments().length === 0\" class=\"no-data-message\">\n            No record found\n        </div>\n        <!-- Pagination -->\n        <div class=\"mt-10\">\n            <mat-paginator [pageSize]=\"5\" [pageSizeOptions]=\"[5, 10, 20]\"></mat-paginator>\n        </div>\n\n\n    </mat-card>\n</div>\n\n\n\n<!-- Overlay -->\n<div class=\"popup-overlay\" *ngIf=\"showSampleDialogFlag\">\n\n  <!-- Popup -->\n  <div class=\"sample-popup\">\n\n    <!-- Header -->\n    <div class=\"popup-header\">\n      <div class=\"title-section\">\n        <div class=\"title-icon\">\n          <mat-icon>description</mat-icon>\n        </div>\n\n        <div>\n          <p class=\"heading\">Download Sample Document</p>\n\n          <p>\n            Use these sample templates as a reference for preparing your\n            designation & role mapping document.\n          </p>\n        </div>\n      </div>\n\n      <button mat-icon-button class=\"close-btn\" (click)=\"showSampleDialogFlag = false\">\n        <mat-icon>close</mat-icon>\n      </button>\n    </div>\n\n    <!-- Card 1 -->\n    <div class=\"document-card\">\n\n      <div class=\"doc-left\">\n\n        <div class=\"doc-icon blue\">\n          <mat-icon>description</mat-icon>\n        </div>\n\n        <div class=\"doc-content\">\n          <div class=\"doc-title\">Sample Work Allocation order structure</div>\n\n          <div class=\"doc-subtitle\">\n            .docx \u00B7 Editable template\n          </div>\n        </div>\n\n      </div>\n\n       <a\n    href=\"assets/sample-documents/Draft Template_Input Document_AI-CBP Tool (19052026).docx\"\n    download\n    class=\"download-btn\">\n\n    <mat-icon>download</mat-icon>\n\n  </a>\n\n    </div>\n\n    <!-- Card 2 -->\n    <div class=\"document-card\">\n\n      <div class=\"doc-left\">\n\n        <div class=\"doc-icon red\">\n          <mat-icon>picture_as_pdf</mat-icon>\n        </div>\n\n        <div class=\"doc-content\">\n          <div class=\"doc-title\">Sample work allocation order document</div>\n\n          <div class=\"doc-subtitle\">\n            .pdf \u00B7 Reference format\n          </div>\n        </div>\n\n      </div>\n\n        <a\n    href=\"assets/sample-documents/MPTB-English.pdf\"\n    download\n    class=\"download-btn\">\n\n    <mat-icon>download</mat-icon>\n\n  </a>\n\n    </div>\n\n    <!-- Note -->\n    <div class=\"note-box\">\n      <span class=\"note-label\">Note:</span>\n      Please make sure the uploadable document is in\n      <b>PDF format</b> only. Maximum file size:\n      <b>25 MB</b>.\n    </div>\n\n    <!-- Footer -->\n    <div class=\"popup-footer\">\n      <button\n        class=\"close-footer-btn\"\n        (click)=\"showSampleDialogFlag = false\">\n        Close\n      </button>\n    </div>\n\n  </div>\n</div>\n\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n    <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: [".header{display:flex;flex-direction:row;justify-content:space-between}.primary-btn{background-color:#1b4ca1;color:#fff}.mat-card-container{background:transparent;padding:25px;margin:25px 0}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;font-size:20px;left:10px}.search .clear-icon{position:absolute;top:15px;font-size:20px;right:10px;color:#666}.search .clear-icon:hover{color:#333}.search .sinput{border-radius:32px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato;width:800px}.no-data-message{text-align:center;padding:16px;font-style:italic;color:#888}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-sample{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #eee);color:var(--white-kb-white-100, #000);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.ml-10{margin-left:10px}.mt-10{margin-top:10px}.cursor-pointer{cursor:pointer}.doc-title{font-weight:700}:host ::ng-deep .mat-mdc-header-row{position:sticky;top:0;z-index:10;background:#fff;font-size:16px;box-shadow:0 2px 4px #0000001a;padding:5px 10px}:host ::ng-deep .mat-mdc-row{font-size:16px}:host ::ng-deep .mat-mdc-cell{padding:5px 10px}:host ::ng-deep .mat-mdc-header-cell{background:#fff;font-weight:600;font-size:18px;border-bottom:2px solid #e0e0e0}:host ::ng-deep th.mat-mdc-header-cell:not(:last-child){position:relative;border-right:none;padding:5px 10px}:host ::ng-deep th.mat-mdc-header-cell:not(:last-child):after{content:\"\";position:absolute;top:12px;bottom:12px;right:0;width:1px;background-color:#e0e0e0}::ng-deep .doc-summary-text ::ng-deep markdown p{line-height:1.5rem;font-family:Lato;font-size:1rem!important;font-style:normal;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}.edit-plan{display:flex;padding:4px 10px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:17px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px;height:30px}.select-map-route-container{display:flex;flex-direction:row;width:100%}.select-map-flex{display:flex;flex-direction:row}.select-map-flex-container{display:flex;justify-content:space-between;width:100%}.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}.success{background:green;padding:4px 6px;color:#fff;border-radius:20px}.in-progress{background:orange;padding:4px 6px;color:#fff;border-radius:20px}.flex{display:flex}.flex-row{flex-direction:row}.ml-5{margin-left:5px}.sample-btn{border-radius:28px;padding:0 18px;height:44px;font-weight:600;display:flex;align-items:center;gap:8px}.popup-overlay{position:fixed;inset:0;background:#00000073;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;z-index:9999}.sample-popup{width:550px;background:#fff;border-radius:18px;padding:24px;box-shadow:0 10px 40px #0000002e;animation:popupFade .2s ease}@keyframes popupFade{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.popup-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:22px}.title-section{display:flex;gap:14px}.title-section .heading{margin:0;font-size:18px;font-weight:700;color:#1e293b}.title-section p{margin:8px 0 0;font-size:14px;line-height:22px;color:#64748b}.title-icon{width:25px;height:24px;min-width:42px;border-radius:12px;background:#e8f0ff;display:flex;align-items:center;justify-content:center}.title-icon mat-icon{color:#2563eb;font-size:22px}.close-btn{margin-top:-6px}.close-btn mat-icon{color:#64748b}.document-card{border:1px solid #e5e7eb;border-radius:16px;padding:16px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;transition:all .2s ease}.document-card:hover{border-color:#cbd5e1;background:#fafafa}.doc-left{display:flex;align-items:center;gap:14px}.doc-icon{width:32px;height:32px;border-radius:12px;display:flex;align-items:center;justify-content:center}.doc-icon mat-icon{font-size:18px}.doc-icon.blue{background:#e8f0ff}.doc-icon.blue mat-icon{color:#2563eb}.doc-icon.red{background:#ffe9e9}.doc-icon.red mat-icon{color:#dc2626}.doc-content .doc-title{font-size:14px;font-weight:700;color:#111827;margin-bottom:4px}.doc-content .doc-subtitle{font-size:14px;color:#6b7280}.note-box{background:#fff8e7;border:1px solid #f4cf70;border-radius:14px;padding:14px 16px;color:#92400e;font-size:14px;line-height:22px;margin-top:8px}.note-box .note-label{font-weight:700}.popup-footer{display:flex;justify-content:flex-end;margin-top:22px}.close-footer-btn{border-radius:12px;min-width:90px;height:42px;font-weight:400;border:none!important}.download-btn{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#64748b;text-decoration:none;transition:all .2s ease}.download-btn:hover{background:#f1f5f9;color:#111827}.download-btn mat-icon{font-size:22px}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2.SharedService }, { type: i3.MatSnackBar }, { type: i4.FormBuilder }, { type: i5.Router }]; }, propDecorators: { paginator: [{
                type: ViewChild,
                args: [MatPaginator]
            }] } });
//# sourceMappingURL=data:application/json;base64, 