import { SvelteComponentTyped } from "svelte"; import type { LinkProps } from "./Link.svelte"; type $Props = { /** * Specify the content to download. */ data?: string | Blob | undefined; /** * Specify the downloaded file name. * @default "download" */ filename?: string; /** * Specify the MIME type used to build the `Blob` when `data` is a string. */ type?: string | undefined; /** * Set to `true` to disable the link. * @default false */ disabled?: boolean; /** * Override the default download behavior (creates an object URL for * `data` and clicks a temporary anchor). It gets `data`, `filename` and * `type` as set, so `data` and `type` may be `undefined`. * @default downloadFile */ download?: (data: string | Blob | undefined, filename: string, type: string | undefined) => void | Promise; children?: (this: void) => void; }; export type LinkDownloadProps = Omit & $Props; export default class LinkDownload extends SvelteComponentTyped< LinkDownloadProps, { blur: WindowEventMap["blur"]; click: WindowEventMap["click"]; download: CustomEvent; "download:error": CustomEvent<{ error: unknown; }>; focus: WindowEventMap["focus"]; keydown: WindowEventMap["keydown"]; keyup: WindowEventMap["keyup"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record } > {}