/** Return value of {@link useArtifactDownload}. */
export interface UseArtifactDownloadReturn {
    /**
     * Mint a fresh presigned URL for `storageKey` and trigger a browser
     * download. No-op when the execution id is unknown or a download is already
     * in flight. Resolves once the download has been initiated.
     *
     * @param storageKey - Storage key of the artifact to download.
     * @param fileName - Optional suggested file name for the saved file.
     */
    readonly download: (storageKey: string, fileName?: string) => Promise<void>;
    /** `true` while a URL is being minted / the download is being initiated. */
    readonly isDownloading: boolean;
    /** Error from the last failed download attempt, or `null` when healthy. */
    readonly error: Error | null;
}
/**
 * Behavior hook that downloads an execution artifact on demand.
 *
 * Mirrors the click → mint fresh URL → browser download flow established by
 * `WorkflowExecutionArtifactPanel`, generalized so every artifact "Download"
 * affordance shares one implementation. The URL is minted at click time from
 * the stable `storageKey` via `getArtifactDownloadUrl`, so it is always valid —
 * unlike the previously persisted, short-lived URL that expired after an hour.
 *
 * Returns an imperative `download(storageKey, fileName?)` action rather than a
 * URL, because a download is a user action, not render data. For rendering an
 * image or showing a link, use {@link useArtifactDownloadUrl} instead.
 *
 * @param executionId - Execution that produced the artifacts, or `null` to
 *   disable (the action becomes a no-op).
 *
 * @example
 * ```tsx
 * const { download, isDownloading } = useArtifactDownload(executionId);
 * <button onClick={() => download(artifact.storageKey, artifact.name)} disabled={isDownloading}>
 *   Download
 * </button>
 * ```
 *
 * @see useArtifactDownloadUrl — declarative URL resolver (image src, links)
 */
export declare function useArtifactDownload(executionId: string | null): UseArtifactDownloadReturn;
//# sourceMappingURL=useArtifactDownload.d.ts.map