export interface UseDownloadOptions { mimeType?: string; fetchOptions?: RequestInit; } export type DownloadStatus = "idle" | "downloading" | "success" | "error"; export interface UseDownloadReturn { status: DownloadStatus; error: string | null; download: (source: Blob | string | object, filename: string, options?: UseDownloadOptions) => Promise; } /** * Downloads a Blob, plain string, JSON-serializable object, or remote URL. * It dynamically handles fetching remote/relative URLs or generating text/JSON blobs on the fly. * * @returns Object containing the current download `status`, any `error` message, and the `download` execution function. * * @example * ```tsx * const { download, status } = useDownload(); * * const handleExport = () => { * download({ key: "value" }, "export.json"); * }; * * return ; * ``` */ export declare function useDownload(): UseDownloadReturn; export default useDownload;