import { ElementRef, TemplateRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { Observable } from 'rxjs'; import { FileInputConfig } from './file-input.config'; import * as i0 from "@angular/core"; export interface UploadedFile { isLoading?: boolean; imageId: string; file: File; } export declare class UsaFileInputComponent implements ControlValueAccessor { private fileInputConfig; fileInputElement: ElementRef; multiple: boolean; acceptFileType: string; id: string; hint: string | TemplateRef; disabled: boolean; selectedFiles: File[]; clearFilesOnAdd: boolean; displayFileInfo: boolean; uploadRequest: (file: File) => Observable; selectedFilesChange: EventEmitter; uploadError: EventEmitter; DRAG_OVER_STATE: boolean; ERROR_STATE: boolean; inputFiles: UploadedFile[]; private onChange; private onTouched; constructor(fileInputConfig: FileInputConfig); onDragLeave(): void; onDragOver(): void; onFileDrop(): void; onNewFilesUpload($event: any): void; removeFile(file: File): void; clearFiles(): void; onUploadError(file: File): void; trackLoadedFilesBy(index: number, item: UploadedFile): string; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(files: File[]): void; setDisabledState(isDisabled: boolean): void; private validateFileType; /** * Given a file and list of pre-uploaded files, generates and returns an id for the file. * If file already exists in pre-uploaded files list, then the id will simply be appended with * a counter to ensure uniqueness * @param file - File to generate id for * @param preExistingFiles - List of files that are uploaded and already have an id * @returns An id for the image */ private getImageId; /** * Creates an ID name for each file that strips all invalid characters. * @param {string} name - name of the file added to file input * @returns {string} same characters as the name with invalid chars removed */ private _makeSafeForID; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }