import { ToastAction } from "@instill-ai/design-system"; export declare const TOAST_DEFAULT_DURATION = 4000; export declare function toastInstillError({ title, error, description, action, duration, }: { title: string; error?: unknown; description?: string; action?: ToastAction; duration?: number; }): void; export type DuplicateFileInfo = { existing_file_name: string; existing_file_id: string; existing_namespace_id: string; existing_knowledge_base_id?: string; }; /** * Extracts duplicate file metadata from a duplicate-content error. * Handles two error shapes: * 1. InstillError (toolkit SDK): { status: 409, response: { details: [...] } } * 2. Raw JSON body (EE SDK): { code: 6, details: [...] } * Returns null if the error is not a duplicate file error. */ export declare function getDuplicateFileInfo(error: unknown): DuplicateFileInfo | null; /** * Shows a toast for duplicate file errors with a clickable link to the existing file. */ export declare function toastDuplicateFileError({ fileName, existingFileName, existingFileLink, duration, }: { fileName: string; existingFileName: string; existingFileLink: string; duration?: number; }): void; //# sourceMappingURL=toastInstillError.d.ts.map