/** Preview renderer to use; "other" falls back to a download-only panel. */ export type FilePreviewKind = "image" | "pdf" | "video" | "other"; /** Props for FilePreview, a modal viewer that infers image/pdf/video/other from the file extension. */ export interface FilePreviewProps { /** Shows the modal. */ isOpen: boolean; /** Called on close button, Escape or overlay click. */ onClose: () => void; /** Changing this while isOpen stays true does NOT reset zoom/rotation — remount via key={fileUrl}. */ fileUrl: string; /** Drives kind-detection instead of fileUrl when set — a name with no extension forces the no-preview fallback. */ fileName?: string; /** Force a renderer. When omitted it is inferred from the file extension. */ fileType?: FilePreviewKind; /** Hide the download action. */ hideDownload?: boolean; /** Modal size. */ size?: "md" | "lg" | "xl" | "2xl" | "full"; } /** Props for FilePreviewTrigger — a thumbnail button that opens FilePreview in a modal. */ export interface FilePreviewTriggerProps { /** URL of the file. */ fileUrl: string; /** Names the button "Preview " ("Preview file" when omitted) and drives kind detection. */ fileName?: string; /** Forces a renderer; inferred from the file extension when omitted. */ fileType?: FilePreviewKind; /** Thumbnail max width. */ thumbWidth?: string; /** Thumbnail max height. */ thumbHeight?: string; /** Hides the download action inside the opened preview. */ hideDownload?: boolean; }