import { EventEmitter, OnInit } from '@angular/core';
import { ControlValueAccessor, NgControl } from '@angular/forms';
import { NtFileSizeError, NtFileTypeError, NtUploadError, NtUploadHandler, NtUploadRef } from '@ng-tangram/components/core';
import { NtFormFieldControl } from '@ng-tangram/components/forms';
import { NtAttachmentIcons } from './attachment-icons';
export declare type NtAttachmentError = NtFileTypeError | NtFileSizeError | NtUploadError;
export declare class NtAttachmentRef<T> extends NtUploadRef<T> {
    file: File;
    id: string;
    category?: string;
    constructor(file: File, id?: string);
}
export declare class NtAttachmentComponent<T> extends NtFormFieldControl<NtAttachmentRef<T>[]> implements OnInit, ControlValueAccessor {
    private _uploadHandler;
    ngControl: NgControl;
    icons: NtAttachmentIcons;
    private readonly _destroy;
    _displayAttachmentRefs: NtAttachmentRef<T>[];
    private _attachmentRefs;
    get value(): NtAttachmentRef<T>[];
    private _disabled;
    get disabled(): boolean;
    set disabled(value: boolean);
    private _readonly;
    get readonly(): boolean;
    set readonly(value: boolean);
    private _notrigger;
    get notrigger(): boolean;
    set notrigger(value: boolean);
    private _required;
    get required(): boolean;
    set required(value: boolean);
    private _accept;
    set accept(value: string | Array<string>);
    get accept(): string | Array<string>;
    private _multiple;
    get multiple(): boolean;
    set multiple(value: boolean);
    private _limitSize;
    get limitSize(): number;
    set limitSize(value: number);
    url: string;
    name: string;
    errors: EventEmitter<NtFileTypeError | NtFileSizeError | NtUploadError | NtAttachmentError[]>;
    private _onChange;
    private _onTouched;
    constructor(_uploadHandler: NtUploadHandler, ngControl: NgControl, icons: NtAttachmentIcons);
    ngOnInit(): void;
    ngOnDestroy(): void;
    writeValue(value: NtAttachmentRef<T>[]): void;
    registerOnChange(fn: (_: any) => {}): void;
    registerOnTouched(fn: () => {}): void;
    setDisabledState(isDisabled: boolean): void;
    _select(files: File[]): void;
    _remove(attachmentRef: NtAttachmentRef<T>): void;
    private _createAttachmentRef;
    private _removeAttachmentRef;
    private _resolveUploadedResult;
    private _initValueCategoies;
}
