/**
 * File handling functions
 * @module File
 * @group Files
 * */
/**
 * A method to download any text as a file
 * @param text - the text to download
 * @param fileType - the file type like "application/json"
 * @param fileName - the full file name like "myKey.json"
 * @param isBlob
 */
export declare function downloadFile(text: string | Blob, fileType: string, fileName: string, isBlob?: boolean): void;
/**
 * Upload and parse JSON keypair
 * @param {Function} callback - a function to handle the loaded file from the reader
 */
export declare function uploadText(files: FileList, callback?: Function): void;
/**
 * @interface PictureUploadOptions
 * @param  preserveRatio - should we preserve the original picture aspect ratio? Default: `false`
 * @param picSize - width of the rendered picture
 * @param  maxSize - maximum size of an uploaded picture
 */
export interface PictureUploadOptions {
    preserveRatio?: boolean;
    picSize?: number;
    maxSize?: number;
}
/**
 * @interface PictureUploadData
 * @param state - a reactive object with the state of the upload
 * @param handleUpload - handler function to use with `@change="handleUpload"` on an `<input type="file">` element
 */
export interface PictureUploadData {
    state: object;
    handleChange: Function;
}
export interface UploadState {
    errors: any[];
    status: '' | 'loading' | 'success';
    output: object;
}
/**
 * Process an uploaded picture by rendering in into a canvas with given size. Returns a base64 encoded image to be stored and displayed as `img.src`
 * @example
 * const src = ref(null)
 *
 * const {state, handleUpload} = usePictureUpload({
 *  preserveRatio: true,
 * })
 *
 * watch(()=>state.output, file => src.value = file.content)
 */
export declare function usePictureUpload({ preserveRatio, picSize, maxSize, }: PictureUploadOptions): PictureUploadData;
export declare function base64MimeType(encoded: string): string;
export declare function base64FileType(encoded: string): string;
export declare function base64Extension(encoded: string): string;
export declare function detectMimeType(b64: string): any;
