import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/button";
import * as i2 from "@angular/material/card";
import * as i3 from "@angular/material/icon";
import * as i4 from "@angular/material/progress-bar";
import * as i5 from "./filesize.pipe";
/**
 * Component to display an uploaded file
 *
 */
export class FileComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FileComponent, selector: "mic-file", inputs: { file: "file", config: "config" }, ngImport: i0, template: "<mat-card appearance=\"outlined\">\n  <mat-card-header>\n    <mat-card-title>\n      <span>{{ file.name }}</span>\n      @if (config.onFileDeleted) {\n      <button mat-icon-button (click)=\"config.onFileDeleted(file)\" aria-label=\"delete uploaded file\">\n        <mat-icon role=\"img\" aria-label=\"delete\" aria-hidden=\"false\">delete</mat-icon>\n      </button>\n      }\n    </mat-card-title>\n    <mat-card-subtitle>\n      <span>{{ file.size | fileSize }}</span>\n      @if (config.progress?.value) {\n      <span>{{ config.progress.value }} %</span>\n      }\n    </mat-card-subtitle>\n  </mat-card-header>\n  @if (config.progress) {\n  <mat-card-footer>\n    <mat-progress-bar [mode]=\"config.progress.mode\" [value]=\"config.progress.value\"></mat-progress-bar>\n  </mat-card-footer>\n  }\n</mat-card>\n", styles: [":host{display:block;margin-top:10px;width:100%}:host .mat-mdc-card{padding:2px}:host .mat-mdc-card-footer{margin:0 -3px -5px}:host .mat-mdc-card-header{width:calc(100% - 32px)}:host .mat-mdc-card-header ::ng-deep .mat-mdc-card-header-text{width:100%}:host .mat-mdc-card-header .mat-mdc-card-subtitle{font-size:12px;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:5px}:host .mat-mdc-card-header .mat-mdc-card-title{font-size:12px;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:-15px}\n"], dependencies: [{ kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2.MatCardFooter, selector: "mat-card-footer" }, { kind: "component", type: i2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i2.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i5.FileSizePipe, name: "fileSize" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileComponent, decorators: [{
            type: Component,
            args: [{ selector: 'mic-file', template: "<mat-card appearance=\"outlined\">\n  <mat-card-header>\n    <mat-card-title>\n      <span>{{ file.name }}</span>\n      @if (config.onFileDeleted) {\n      <button mat-icon-button (click)=\"config.onFileDeleted(file)\" aria-label=\"delete uploaded file\">\n        <mat-icon role=\"img\" aria-label=\"delete\" aria-hidden=\"false\">delete</mat-icon>\n      </button>\n      }\n    </mat-card-title>\n    <mat-card-subtitle>\n      <span>{{ file.size | fileSize }}</span>\n      @if (config.progress?.value) {\n      <span>{{ config.progress.value }} %</span>\n      }\n    </mat-card-subtitle>\n  </mat-card-header>\n  @if (config.progress) {\n  <mat-card-footer>\n    <mat-progress-bar [mode]=\"config.progress.mode\" [value]=\"config.progress.value\"></mat-progress-bar>\n  </mat-card-footer>\n  }\n</mat-card>\n", styles: [":host{display:block;margin-top:10px;width:100%}:host .mat-mdc-card{padding:2px}:host .mat-mdc-card-footer{margin:0 -3px -5px}:host .mat-mdc-card-header{width:calc(100% - 32px)}:host .mat-mdc-card-header ::ng-deep .mat-mdc-card-header-text{width:100%}:host .mat-mdc-card-header .mat-mdc-card-subtitle{font-size:12px;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:5px}:host .mat-mdc-card-header .mat-mdc-card-title{font-size:12px;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:-15px}\n"] }]
        }], propDecorators: { file: [{
                type: Input
            }], config: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy90aGVtZS9zcmMvbGliL3VwbG9hZC9maWxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3RoZW1lL3NyYy9saWIvdXBsb2FkL2ZpbGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7QUFHakQ7OztHQUdHO0FBTUgsTUFBTSxPQUFPLGFBQWE7K0dBQWIsYUFBYTttR0FBYixhQUFhLDRGQ1oxQixpekJBdUJBOzs0RkRYYSxhQUFhO2tCQUx6QixTQUFTOytCQUNFLFVBQVU7OEJBUVgsSUFBSTtzQkFBWixLQUFLO2dCQUlHLE1BQU07c0JBQWQsS0FBSyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgSW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEZpbGVDb25maWcgfSBmcm9tICcuL2ZpbGUubW9kZWwnO1xuXG4vKipcbiAqIENvbXBvbmVudCB0byBkaXNwbGF5IGFuIHVwbG9hZGVkIGZpbGVcbiAqXG4gKi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