import React from 'react';
/**
 * @returns {void}
 * @memberof DropZone
 * @alias OnDropDownChange
 */
export declare type OnDropZoneChange = (files: Array<File>) => void;
/**
 * @memberof DropZone
 * @alias DropZoneProps
 */
export declare type DropZoneProps = {
    multiple?: boolean;
    /**
     * Callback performed when the file is dropped/selected
     */
    onChange?: OnDropZoneChange;
    /**
     * Validate options
     */
    validate?: {
        /**
         * Maximum size of the uploaded file in bytes. If not defined - all files are allowed.
         */
        maxSize?: number;
        /**
         * Available mime types. When not defined - all mime types are allowed.
         */
        mimeTypes?: Array<string>;
    };
};
/**
 * DropZone which can be used for uploading files.
 *
 * General usage:
 * ```javascript
 * import { DropZone, DropZoneProps } from 'admin-bro'
 * ```
 *
 * how to use it in your custom component.tsx (TypesScript):
 * ```
 * import React, { useState } from 'react'
 * import { DropZone, Label, BasePropertyProps } from 'admin-bro'
 * import { unflatten } from 'flat'
 *
 * const UploadPhoto: React.FC<BasePropertyProps> = (props) => {
 *   const { property, record, onChange } = props
 *
 *   const onUpload = (files: FileList) => {
 *     const newRecord = {...record}
 *     const file = files.length && files[0]
 *
 *     onChange({
 *       ...newRecord,
 *       params: {
 *         ...newRecord.params,
 *         [property.name]: file,
 *       }
 *     })
 *     event.preventDefault()
 *   }
 *
 *   return (
 *     <Box>
 *       <Label>{property.label}</Label>
 *       <DropZone onChange={onUpload} />
 *     </Box>
 *   )
 * }
 * ```
 *
 * @component
 * @subcategory Molecules
 *
 * @example <caption>Single file with validation</caption>
 * const maxSize = 1024 * 100
 * const mimeTypes = ['application/pdf']
 * const onUpload = (files) => { alert(files,length ? files[0].name : 'no files' ) }
 * return (
 * <Box>
 *   <DropZone
 *     onChange={onUpload}
 *     validate= { { maxSize, mimeTypes } }
 *   />
 * </Box>
 * )
 *
 * @example <caption>Multi file of photos</caption>
 * const mimeTypes = ['image/png']
 * const onUpload = (files) => { alert(files.length ? files.length : 'no files' ) }
 * return (
 * <Box>
 *   <DropZone
 *     multiple
 *     onChange={onUpload}
 *     validate= { { mimeTypes } }
 *   />
 * </Box>
 * )
 */
export declare const DropZone: React.FC<DropZoneProps>;
export default DropZone;
