import { EventEmitter } from '../../../stencil-public-runtime';
import { PnColors, PnLanguages, PnUploadFileItem } from "../../../globals/types";
/**
 * Users can drop files directly into the upload area of the component
 * or simply click on it to open their native file explorer.
 *
 * @nativeChange Use the `change` event to listen when the input receives files.
 *
 * @nativeCancel The `cancel` event lets you know the user canceled their selection.
 * Either via clicking on the "Cancel" button or pressing `ESC`.
 * */
export declare class PnFileUpload {
    id: string;
    idFileUpload: string;
    idHelpertext: string;
    idAccepttext: string;
    fileInputElement: HTMLInputElement;
    invalid: boolean;
    maxSizeInBytes: number;
    hostElement: HTMLElement;
    files: PnUploadFileItem[];
    isHovering: boolean;
    /** The default label is "Click or drag a file here". @since v7.1.0 */
    label?: string;
    /**
     * The helpertext defaults to "Supported formats {x} and max filesize {y}",
     * if there is a value set for the prop `accept`.
     * @since v7.1.0
     **/
    helpertext?: string;
    /** Manually set the language. @category Features */
    language?: PnLanguages;
    /** Always hide the progress bar, even when upload has begun. @category Features  */
    hideProgress: boolean;
    /**
     * Set a HTML name.
     * @since v7.1.0
     * @category HTML attributes
     */
    name: string;
    /** Set which file types the input accepts. Ex: .docs,.xml @category HTML attributes */
    accept: string;
    /** Set the maximum upload size. @category HTML attributes */
    maxSize: string;
    /**
     * Use the capture mode.
     * @since v7.1.0
     * @category HTML attributes
     */
    capture?: '' | 'user' | 'environment';
    /**
     * Set maximum amount of files to be selected.
     * Any value above 1 will force the `multiple` to be `true`.
     * @category HTML attributes
     **/
    limit: number;
    /** Allow multiple files to be selected. Will be overwritten to true, if `limit` is above 1. @category HTML attributes */
    multiple: boolean;
    /** Set the input as required. @category HTML attributes */
    required?: boolean;
    /** Disable the input. @category HTML attributes */
    disabled: boolean;
    handleLimit(): void;
    handleMaxBytes(): void;
    /** This event is emitted when you add files. Either via drag and drop or using the file explorer. */
    filesAdded: EventEmitter<PnUploadFileItem[]>;
    /** Emitted everytime an update is made to one of the files. */
    update: EventEmitter<{
        files: PnUploadFileItem[];
        element: HTMLElement;
    }>;
    /** If any error occurs, such as: invalid file type, size, limit or error during upload. */
    fileuploaderror: EventEmitter<Error>;
    /** Emitted everytime you select a valid file. It's a good idea to use this event in order to make use of the built in validation features. */
    valid: EventEmitter<this>;
    /** Emitted once the file upload has begun. */
    uploadFile: EventEmitter<{
        file: PnUploadFileItem;
        index: number;
        uploader: any;
    }>;
    /** Emitted when an upload has been cancelled before completion. */
    uploadCancelled: EventEmitter<PnUploadFileItem>;
    /** Emitted once the upload is finished. */
    uploadCompleted: EventEmitter<PnUploadFileItem[]>;
    componentWillLoad(): Promise<void>;
    /** Start the upload of all selected files (excludes invalid files). */
    startUpload(): Promise<void>;
    /** Clear the selected files, state and input value. */
    clearUpload(): Promise<void>;
    /** Remove the selected file. */
    removeFile(targetFile: PnUploadFileItem): Promise<void>;
    /** Update an existing file. */
    updateFile(file: PnUploadFileItem, index?: any): Promise<void>;
    private _addFilesFromFileList;
    private _onAddFile;
    private _onDragOverFile;
    private _onDragLeaveFile;
    private _onDropFile;
    private _validateFileType;
    private _validateFileSize;
    private _validateLimit;
    private _isNotGreaterThanLimit;
    private _checkValidity;
    private _createBase64FromFile;
    private _addFile;
    private _emitUpdateEvent;
    translate(prop: string): string;
    isLoading(file: PnUploadFileItem): boolean;
    getFileItemClass: (file: PnUploadFileItem) => string;
    getFileIcon(file: PnUploadFileItem): string;
    getFileColor(file: PnUploadFileItem): PnColors;
    describedBy(): string;
    render(): any;
}
