import { Component, Output, EventEmitter, Input } from "@angular/core";
import { coerceNumberProperty } from '@angular/cdk/coercion';
import * as i0 from "@angular/core";
import * as i1 from "../../services/upload.service";
import * as i2 from "./dxc-file-preview/dxc-file-preview.component";
import * as i3 from "@angular/common";
export class DxcFilesPreviewComponent {
    constructor(service) {
        this.service = service;
        this.showOverlay = new EventEmitter();
    }
    get tabIndexValue() {
        return this._tabIndexValue;
    }
    set tabIndexValue(value) {
        this._tabIndexValue = coerceNumberProperty(value);
    }
    ngOnInit() {
        this.service.setSuccess(false);
        this.service.setErrorMessage("");
    }
    dragEnter(event) {
        event.preventDefault();
        event.stopPropagation();
        this.showOverlay.emit(true);
    }
}
DxcFilesPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DxcFilesPreviewComponent, deps: [{ token: i1.UploadService }], target: i0.ɵɵFactoryTarget.Component });
DxcFilesPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: DxcFilesPreviewComponent, selector: "dxc-files-preview", inputs: { filesList: "filesList", tabIndexValue: "tabIndexValue" }, outputs: { showOverlay: "showOverlay" }, ngImport: i0, template: "<div class=\"previewContainer\" (dragenter)=\"dragEnter($event)\">\n  <div *ngFor=\"let file of filesList\">\n    <dxc-file-preview [file]=\"file\" [tabIndexValue]=\"tabIndexValue\"></dxc-file-preview>\n  </div>\n</div>\n", styles: [":host{display:block;width:inherit;height:83%;overflow-y:auto}:host ::-webkit-scrollbar{width:3px}:host ::-webkit-scrollbar-track{background-color:var(--upload-scrollBarTrackColor);border-radius:3px}:host ::-webkit-scrollbar-thumb{background-color:var(--upload-scrollBarThumbColor);border-radius:3px}:host .previewContainer{overflow-y:auto;display:block;padding:24px;height:inherit}\n"], components: [{ type: i2.DxcFilePreviewComponent, selector: "dxc-file-preview", inputs: ["file", "tabIndexValue"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DxcFilesPreviewComponent, decorators: [{
            type: Component,
            args: [{ selector: "dxc-files-preview", template: "<div class=\"previewContainer\" (dragenter)=\"dragEnter($event)\">\n  <div *ngFor=\"let file of filesList\">\n    <dxc-file-preview [file]=\"file\" [tabIndexValue]=\"tabIndexValue\"></dxc-file-preview>\n  </div>\n</div>\n", styles: [":host{display:block;width:inherit;height:83%;overflow-y:auto}:host ::-webkit-scrollbar{width:3px}:host ::-webkit-scrollbar-track{background-color:var(--upload-scrollBarTrackColor);border-radius:3px}:host ::-webkit-scrollbar-thumb{background-color:var(--upload-scrollBarThumbColor);border-radius:3px}:host .previewContainer{overflow-y:auto;display:block;padding:24px;height:inherit}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.UploadService }]; }, propDecorators: { showOverlay: [{
                type: Output
            }], filesList: [{
                type: Input
            }], tabIndexValue: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHhjLWZpbGVzLXByZXZpZXcuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZHhjLW5neC1jZGsvc3JjL2xpYi9keGMtdXBsb2FkL2R4Yy1maWxlcy10by11cGxvYWQvZHhjLWZpbGVzLXByZXZpZXcvZHhjLWZpbGVzLXByZXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZHhjLW5neC1jZGsvc3JjL2xpYi9keGMtdXBsb2FkL2R4Yy1maWxlcy10by11cGxvYWQvZHhjLWZpbGVzLXByZXZpZXcvZHhjLWZpbGVzLXByZXZpZXcuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEs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