/**
* DevExtreme (ui/file_uploader.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import '../jquery_augmentation';

import {
    dxElement
} from '../core/element';

import {
    event
} from '../events/index';

import Editor, {
    EditorOptions
} from './editor/editor';

import UploadInfo from '../file_management/upload_info';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxFileUploaderOptions extends EditorOptions<dxFileUploader> {
    /**
     */
    abortUpload?: ((file: File, uploadInfo?: UploadInfo) => Promise<any> | JQueryPromise<any> | any);
    /**
     */
    accept?: string;
    /**
     */
    allowCanceling?: boolean;
    /**
     */
    allowedFileExtensions?: Array<string>;
    /**
     */
    chunkSize?: number;
    /**
     */
    focusStateEnabled?: boolean;
    /**
     */
    invalidFileExtensionMessage?: string;
    /**
     */
    invalidMaxFileSizeMessage?: string;
    /**
     */
    invalidMinFileSizeMessage?: string;
    /**
     */
    inputAttr?: any;
    /**
     */
    labelText?: string;
    /**
     */
    maxFileSize?: number;
    /**
     */
    minFileSize?: number;
    /**
     */
    multiple?: boolean;
    /**
     */
    name?: string;
    /**
     */
    onBeforeSend?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, request?: XMLHttpRequest, file?: File, uploadInfo?: UploadInfo }) => any);
    /**
     */
    onDropZoneEnter?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, dropZoneElement?: dxElement, event?: event }) => any);
    /**
     */
    onDropZoneLeave?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, dropZoneElement?: dxElement, event?: event }) => any);
    /**
     */
    onFilesUploaded?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any }) => any);
    /**
     */
    onProgress?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, file?: File, segmentSize?: number, bytesLoaded?: number, bytesTotal?: number, event?: event, request?: XMLHttpRequest }) => any);
    /**
     */
    onUploadAborted?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, file?: File, event?: event, request?: XMLHttpRequest, message?: string }) => any);
    /**
     */
    onUploadError?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, file?: File, event?: event, request?: XMLHttpRequest, error?: any, message?: string }) => any);
    /**
     */
    onUploadStarted?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, file?: File, event?: event, request?: XMLHttpRequest }) => any);
    /**
     */
    onUploaded?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, file?: File, event?: event, request?: XMLHttpRequest, message?: string }) => any);
    /**
     */
    onValueChanged?: ((e: { component?: dxFileUploader, element?: dxElement, model?: any, value?: Array<File>, previousValue?: Array<File>, event?: event }) => any);
    /**
     */
    progress?: number;
    /**
     */
    readyToUploadMessage?: string;
    /**
     */
    selectButtonText?: string;
    /**
     */
    showFileList?: boolean;
    /**
     */
    dialogTrigger?: string | Element | JQuery;
    /**
     */
    dropZone?: string | Element | JQuery;
    /**
     */
    uploadButtonText?: string;
    /**
     */
    uploadChunk?: ((file: File, uploadInfo: UploadInfo) => Promise<any> | JQueryPromise<any> | any);
    /**
     */
    uploadFailedMessage?: string;
    /**
     */
    uploadAbortedMessage?: string;
    /**
     */
    uploadFile?: ((file: File, progressCallback: Function) => Promise<any> | JQueryPromise<any> | any);
    /**
     */
    uploadHeaders?: any;
    /**
     */
    uploadCustomData?: any;
    /**
     */
    uploadMethod?: 'POST' | 'PUT';
    /**
     */
    uploadMode?: 'instantly' | 'useButtons' | 'useForm';
    /**
     */
    uploadUrl?: string;
    /**
     */
    uploadedMessage?: string;
    /**
     */
    value?: Array<File>;
}
/**
 */
export default class dxFileUploader extends Editor {
    constructor(element: Element, options?: dxFileUploaderOptions)
    constructor(element: JQuery, options?: dxFileUploaderOptions)
    /**
     */
    upload(): void;
    /**
     */
    upload(fileIndex: number): void;
    /**
     */
    upload(file: File): void;
    /**
     */
    abortUpload(): void;
    /**
     */
    abortUpload(fileIndex: number): void;
    /**
     */
    abortUpload(file: File): void;
    /**
     */
    removeFile(fileIndex: number): void;
    /**
     */
    removeFile(file: File): void;
}

declare global {
interface JQuery {
    dxFileUploader(): JQuery;
    dxFileUploader(options: "instance"): dxFileUploader;
    dxFileUploader(options: string): any;
    dxFileUploader(options: string, ...params: any[]): any;
    dxFileUploader(options: dxFileUploaderOptions): JQuery;
}
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type Options = dxFileUploaderOptions;

/** @deprecated use Options instead */
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type IOptions = dxFileUploaderOptions;
