import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
import { FormGroup, NgForm } from '@angular/forms';
import { SdLabelDefDirective } from '@sd-angular/core/forms/directives';
import { SdFormControl } from '@sd-angular/core/forms/models';
import { SdConfirmService, SdNotifyService } from '@sd-angular/core/services';
import { PreviewComponent } from './components/preview/preview.component';
import { ISdUploadFileConfiguration, SdUploadFileFuncDetails } from './configurations';
import { PreviewFile, UploadFileService } from './services';
import * as i0 from "@angular/core";
export declare class SdUploadFile<TArgs = any> implements AfterViewInit, OnDestroy {
    #private;
    private ref;
    private notifyService;
    private confirmService;
    private readonly uploadFileConfig;
    private uploadFileService;
    previewFile?: PreviewComponent;
    id: string;
    selectedFile?: PreviewFile | null;
    formControl: SdFormControl;
    set _form(val: NgForm | FormGroup);
    set _name(val: string | undefined);
    args?: TArgs;
    label?: string;
    helperText?: string;
    set _helperText(val: string | undefined);
    description?: string;
    type: 'image' | 'document' | 'file';
    set _type(type: 'image' | 'document' | 'file' | undefined | null);
    set disabled(val: boolean | '' | undefined | null);
    required: boolean;
    set _required(val: boolean | '' | undefined | null);
    extensions: string[];
    set _extensions(extensions: string[] | undefined | null);
    max: number;
    set _max(max: number | undefined | null);
    maxOfImage: number;
    set _maxOfImage(value: number | undefined | null);
    maxSize?: number;
    maxWidth?: number;
    maxHeight?: number;
    scaleToPixel?: number;
    previewWidth: string;
    previewHeight: string;
    align: 'left' | 'center';
    details?: SdUploadFileFuncDetails<any>;
    imageValidator?: (image: HTMLImageElement) => string;
    previewFiles: PreviewFile[];
    set model(model: (string | number | undefined | null)[] | undefined | null);
    loaded: EventEmitter<PreviewFile[]>;
    modelChange: EventEmitter<(string | number)[]>;
    filesChanged: EventEmitter<(string | File)[]>;
    dropElements?: QueryList<ElementRef>;
    canvas?: ElementRef;
    sdLabelDef?: SdLabelDefDirective;
    constructor(ref: ChangeDetectorRef, notifyService: SdNotifyService, confirmService: SdConfirmService, uploadFileConfig: ISdUploadFileConfiguration, uploadFileService: UploadFileService);
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    onUpload: () => void;
    onRemove: (file: PreviewFile) => void;
    onDrop: (event: CdkDragDrop<string[]>) => void;
    onImgError: (previewFile: PreviewFile) => void;
    onSelect: (file: PreviewFile) => void;
    getFiles: () => Promise<File[]>;
    upload: () => Promise<void>;
    preview: () => Promise<void>;
    /**
     * Tải xuống một tệp tin dựa trên đối tượng PreviewFile.
     * * Ưu tiên:
     * 1. Tải xuống từ thuộc tính `file`.
     * 2. Tải xuống từ thuộc tính `src`.
     * 3. Gọi hàm download dựa vào `idOrKey`.
     *
     * @param previewFile Đối tượng PreviewFile chứa thông tin tệp tin.
     */
    onDownload: (previewFile: PreviewFile) => void;
    isLastVisibleOverlay(fileIndex: number): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<SdUploadFile<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SdUploadFile<any>, "sd-upload-file", never, { "_form": { "alias": "form"; "required": false; }; "_name": { "alias": "name"; "required": false; }; "args": { "alias": "args"; "required": false; }; "label": { "alias": "label"; "required": false; }; "_helperText": { "alias": "helperText"; "required": false; }; "description": { "alias": "description"; "required": false; }; "_type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "_required": { "alias": "required"; "required": false; }; "_extensions": { "alias": "extensions"; "required": false; }; "_max": { "alias": "max"; "required": false; }; "_maxOfImage": { "alias": "maxOfImage"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "scaleToPixel": { "alias": "scaleToPixel"; "required": false; }; "previewWidth": { "alias": "previewWidth"; "required": false; }; "previewHeight": { "alias": "previewHeight"; "required": false; }; "align": { "alias": "align"; "required": false; }; "details": { "alias": "details"; "required": false; }; "imageValidator": { "alias": "imageValidator"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "loaded": "loaded"; "modelChange": "modelChange"; "filesChanged": "filesChanged"; }, ["sdLabelDef"], never, true, never>;
}
