import type { ReactElement } from 'react' export interface DownloadItem { /** Unique key (also used as menu label key). */ id: string /** Display label in the menu. */ label: string /** * Optional leading icon shown next to the label. Pass a rendered element * (e.g. ``) so consumers can fully * control sizing / colour. Rendered inside an MUI ``. */ icon?: ReactElement /** * When `true`, the menu item is rendered but non-clickable (greyed out). * Useful for items whose underlying export is unavailable in the current * widget state (no rows, missing permission, etc.). */ disabled?: boolean /** * Override for the resolved filename. When set, `resolve()`'s `filename` * is ignored and this value is used instead — handy when the consumer * wants to template the filename with widget metadata without having to * close over it inside `resolve()`. */ filename?: string /** * Resolves to a Blob URL the trigger will click. Optional `revoke` is * called after the click is dispatched. */ resolve: () => Promise<{ url: string; filename: string; revoke?: () => void }> }