import { SavedFile } from './useSaveToFiles'; /** Two shapes — pick one based on where the bytes come from. */ export type SaveToFilesSource = { kind: 'blob'; /** * Producer thunk. Returning `null` cleanly aborts the save (e.g. user * cancelled a downstream confirm). Producers MAY override the filename * and mime type at runtime (useful when the bytes carry metadata only * known after a slow GraphQL call resolves). */ getBlob: () => Promise<{ blob: Blob; filename?: string; mimeType?: string; } | null>; /** Default filename — used by the browser-download path. */ filename: string; /** Default MIME type — used by the browser-download path. */ mimeType: string; } | { kind: 'sandbox-artifact'; sandboxId: string; sessionId: string; /** Artifact path inside the sandbox session. */ path: string; /** Optional override; otherwise the sandbox's reported filename wins. */ filename?: string; }; interface Props { source: SaveToFilesSource; /** * Pre-selected destination folder path. The dialog will lazily create * missing ancestors via `ensureFolderByPath` on submit. The user can edit * the path in the dialog. */ defaultFolderPath?: string; /** * Browser-download action. Called when the user clicks the primary button. * SaveToFilesButton does not implement the download itself — callers may * have specialised tracking, anti-flood, or transformation logic. */ onDownload: () => void | Promise; /** Called after a successful Save to Files. */ onSaved?: (file: SavedFile) => void; /** Primary button label. Default "Download". */ label?: string; disabled?: boolean; /** ARIA-style test ID prefix; defaults to `save-to-files`. */ testId?: string; /** Pass-through className for the outer wrapper. */ className?: string; } export declare function SaveToFilesButton({ source, defaultFolderPath, onDownload, onSaved, label, disabled, testId, className, }: Props): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=SaveToFilesButton.d.ts.map