import "./file_rows.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import type { GalleryLabels } from "./file_preview"; import type { DisplayFile } from "./file_thumbnail"; import { type StyleProps } from "./style_props"; export interface FileRowsProps extends StyleProps { files: DisplayFile[]; /** Secondary line per file. Default: NONE — pass something the NAME does not * already carry, since the badge and the extension both state the type. */ meta?: (file: DisplayFile) => string | undefined; /** Adds a (confirmed) "Remove" to each ⋯ menu and the gallery toolbar. The host * drops the file from its own state. */ onRemove?: (file: DisplayFile) => void; /** Open a file outside the app (a new tab on the frontend, the SDK's * `openExternal` in a sandboxed app). Adds "Open in new tab". */ onOpenExternal?: (file: DisplayFile) => void; /** Override the Download action (default: fetch + save the URL). The host * frontend passes its own to send `credentials` for auth-gated proxy URLs. */ onDownload?: (file: DisplayFile) => void; /** Reported when a previewed file fails to render (host wires its logger). */ onError?: (error: unknown, meta: { fileId: string; mimeType: string; }) => void; /** Translated chrome — Download / Remove / Open-external / gallery + confirm. */ labels?: Partial; /** WHAT PRESSING A ROW DOES. Default `"preview"`; `"open"` requires * `onOpenExternal` and stops mounting the gallery at all, so a surface that * never previews pays nothing for the engines. */ press?: "preview" | "open"; /** TAKE THE PRESS, and with it the gallery: these rows then mount NO viewer of * their own, so a surface that already owns one does not open a lightbox over * a lightbox. `press="open"` still wins. */ onFilePress?: (file: DisplayFile, files: readonly DisplayFile[]) => void; /** Gap between rows. Default 8. */ gap?: number; /** Credentials mode for the gallery's preview fetches — `"include"` for the * host's auth-gated proxy URLs, omitted for an app's presigned URLs. */ credentials?: RequestCredentials; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** A file LIST that just works: press a row to preview it full-screen, ⋯ for * quick actions. For an ADD/upload surface or bare square tiles use * `FileThumbnailGrid`. */ export declare function FileRows(props: FileRowsProps): React.ReactElement> | null;