import "./file_gallery_dialog.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { Dialog as Base } from "@base-ui/react/dialog"; import type { DisplayFile } from "./file_thumbnail"; import { type ImageRotation } from "./use_image_rotation"; import type { GalleryLabels } from "./file_preview"; import { type StyleProps } from "./style_props"; export interface FileGalleryDialogProps extends StyleProps { files: DisplayFile[]; /** Null means closed. */ activeIndex: number | null; onIndexChange: (next: number | null) => void; /** English fallback when omitted. */ labels?: Partial; /** Wired to the host's logger. */ onError?: (error: unknown, meta: { fileId: string; mimeType: string; }) => void; /** * Omitted, fetch-and-save, right for an app's presigned URLs; the host passes one sending * `credentials: "include"`. */ onDownload?: (file: DisplayFile) => void; /** * A new tab on the frontend, the SDK's `openExternal` in an app (the sandbox cannot open tabs). * Omitted hides the action. */ onOpenExternal?: (file: DisplayFile) => void; /** Shows a confirmed Remove; the host drops the file from its state. */ onRemove?: (fileId: string) => void; /** * Share with an inline gallery via `useImageRotation`; omitted, the modal keeps its own. Images * only. */ rotation?: ImageRotation; /** Default true. */ rotatable?: boolean; /** * Replaces the content renderer, not the chrome; the host routes Excel to its live workbook. * `rotation` is forwarded for images. */ renderPreview?: (file: DisplayFile, opts: { rotation: number; }) => ReactNode; /** * `"include"` for the host's auth-gated proxy; omitted for presigned URLs. Ignored with * `renderPreview`. */ credentials?: RequestCredentials; /** * Shows a confirm beside the rotate buttons when the image is rotated; the host bakes and swaps * the file. Degrees: 90/180/270. */ onPersistRotation?: (file: DisplayFile, degrees: number) => void; /** While a rotation save is in flight. */ persisting?: boolean; /** `document.body` by default. */ container?: HTMLElement | null; testID?: string; ref?: React.Ref; render?: Base.Popup.Props["render"]; } /** Unknown types show a download placeholder. */ export declare function FileGalleryDialog(props: FileGalleryDialogProps): React.JSX.Element;