import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatIconModule } from '@angular/material/icon';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/icon";
import * as i2 from "@angular/common";
export class DocumentComponent {
    constructor() {
        this.documentList = [];
    }
    uploadDocument(ev, file) {
        file.file = ev.srcElement.files[0];
        if (file?.file?.type?.includes('video')) {
            file.type = 'VIDEO';
        }
        else if (file?.file?.type?.includes('image')) {
            file.type = 'IMAGE';
        }
        else {
            file.type = 'FILE';
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DocumentComponent, isStandalone: true, selector: "simpo-document", inputs: { documentList: "documentList" }, ngImport: i0, template: "<section class=\"main-section p-2\">\n  <div class=\"list_tabs heading d-flex align-items-center\">\n    Required Document\n  </div>\n\n  <div class=\"document-section\">\n    <div class=\"document\" *ngFor=\"let document of documentList\">\n      <div class=\"left-side\">\n        <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/183907c1734627971492pdf.png\" alt=\"\">\n        <p>{{document.displayText}}</p>\n      </div>\n      <div class=\"right-side\" (click)=\"fileInput.click()\" *ngIf=\"!(document.file || document.url)\">\n        <div>Upload</div>\n      </div>\n      <div class=\"right-side\" *ngIf=\"document.file || document.url\">\n        <mat-icon>delete</mat-icon>\n      </div>\n\n      <input id=\"vendorImage\" type=\"file\" name=\"myfile\" hidden\n            accept=\".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/x-png,image/jpeg,image/jpg,.pdf, video/mp4,video/x-matroska,video/x-msvideo,video/quicktime\"\n            (change)=\"uploadDocument($event, document)\" class=\"pc-btn\"\n            id=\"browse_contact_image\" #fileInput />\n    </div>\n  </div>\n</section>\n", styles: [".list_tabs{border:1px solid #0000001A;background-color:#ffffffe5;padding:10px;border-radius:6px;gap:10px;height:50px}.heading{font-size:18px;font-weight:500}.align-items-center{align-items:center}.p-2{padding:2rem!important}.document-section{padding-right:2rem;margin-top:2rem;padding-left:2rem;display:flex;flex-direction:column;gap:10px}.document{display:flex;justify-content:space-between;background:#eeecec;padding:1.5rem;border-radius:10px}.left-side{display:flex;align-items:center;gap:20px}.left-side p{margin-bottom:0}.right-side{background:#fff;height:35px;padding-left:30px;padding-right:30px;display:flex;align-items:center;border-radius:8px;font-weight:500}@media screen and (max-width: 475px){.p-2{padding:1rem}.document-section{padding-left:0rem;padding-right:0rem}}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DocumentComponent, decorators: [{
            type: Component,
            args: [{ selector: 'simpo-document', standalone: true, imports: [MatIconModule, CommonModule, FormsModule], template: "<section class=\"main-section p-2\">\n  <div class=\"list_tabs heading d-flex align-items-center\">\n    Required Document\n  </div>\n\n  <div class=\"document-section\">\n    <div class=\"document\" *ngFor=\"let document of documentList\">\n      <div class=\"left-side\">\n        <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/183907c1734627971492pdf.png\" alt=\"\">\n        <p>{{document.displayText}}</p>\n      </div>\n      <div class=\"right-side\" (click)=\"fileInput.click()\" *ngIf=\"!(document.file || document.url)\">\n        <div>Upload</div>\n      </div>\n      <div class=\"right-side\" *ngIf=\"document.file || document.url\">\n        <mat-icon>delete</mat-icon>\n      </div>\n\n      <input id=\"vendorImage\" type=\"file\" name=\"myfile\" hidden\n            accept=\".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/x-png,image/jpeg,image/jpg,.pdf, video/mp4,video/x-matroska,video/x-msvideo,video/quicktime\"\n            (change)=\"uploadDocument($event, document)\" class=\"pc-btn\"\n            id=\"browse_contact_image\" #fileInput />\n    </div>\n  </div>\n</section>\n", styles: [".list_tabs{border:1px solid #0000001A;background-color:#ffffffe5;padding:10px;border-radius:6px;gap:10px;height:50px}.heading{font-size:18px;font-weight:500}.align-items-center{align-items:center}.p-2{padding:2rem!important}.document-section{padding-right:2rem;margin-top:2rem;padding-left:2rem;display:flex;flex-direction:column;gap:10px}.document{display:flex;justify-content:space-between;background:#eeecec;padding:1.5rem;border-radius:10px}.left-side{display:flex;align-items:center;gap:20px}.left-side p{margin-bottom:0}.right-side{background:#fff;height:35px;padding-left:30px;padding-right:30px;display:flex;align-items:center;border-radius:8px;font-weight:500}@media screen and (max-width: 475px){.p-2{padding:1rem}.document-section{padding-left:0rem;padding-right:0rem}}\n"] }]
        }], ctorParameters: () => [], propDecorators: { documentList: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 