import { Injector, OnInit } from '@angular/core';
import { AbstractControl, ControlValueAccessor, NgControl, NgForm, ValidationErrors, Validator } from '@angular/forms';
import { FormDisabledDirective } from '../form-disabled.directive';
import { FileBackendProcessing } from './file-backend-processing';
export interface Record {
    hash: string;
    error?: Error;
    isUploading?: boolean;
    file?: File;
}
export declare class FileComponent implements ControlValueAccessor, Validator, OnInit {
    private fileBackendProcessing;
    private injector;
    private form;
    private formDisabled;
    name: string;
    value: Record[];
    required: boolean;
    set setRequired(value: boolean);
    disabled: boolean;
    set setDisabled(value: boolean);
    multiple: boolean;
    set setMultiple(value: boolean);
    accept: string;
    minSize: string;
    maxSize: string;
    files: File[];
    private onChange;
    private onTouched;
    private model;
    control: NgControl;
    constructor(fileBackendProcessing: FileBackendProcessing, injector: Injector, form: NgForm, formDisabled: FormDisabledDirective);
    ngOnInit(): void;
    get invalid(): boolean;
    get viewDisabled(): boolean;
    validate(control: AbstractControl): ValidationErrors | null;
    registerOnChange(fn: (value: any) => {}): void;
    registerOnTouched(fn: () => {}): void;
    setDisabledState(isDisabled: boolean): void;
    writeValue(value: string | string[]): void;
    updateValue(): void;
    applyValue(files: File[]): Promise<void>;
    uploadFiles(): Promise<void>;
    private updateRecord;
    cancel(key: number): Promise<void>;
    getFileName(record: Record): any;
    filterMultipleByKey(errors: ValidationErrors, key: number): {
        [x: string]: any;
        [x: number]: any;
    };
    filterNotMultiple(errors: ValidationErrors): {
        [x: string]: any;
        [x: number]: any;
    };
}
