import type * as React from "react"; import { type ActionMenuItem } from "./action_menu"; import type { IconButtonSize } from "./icon_button"; import type { GalleryLabels } from "./file_preview"; import type { DisplayFile } from "./file_thumbnail"; /** * WHAT A READER DOES TO ONE FILE, wherever it is drawn: open it and download it always; rename it, put another in * its place and remove it where the host writes the field — each of those absent is an act the host does not offer. */ export interface FileActsHandlers { /** The viewer on it. */ onOpen?: () => void; /** A new tab on the frontend, the SDK's `openExternal` in an app. */ onOpenExternal?: () => void; /** Default fetch-and-save, sending `credentials`. */ onDownload?: () => void; credentials?: RequestCredentials; /** The whole new name, its extension the file's own; a throw keeps the dialog open and says why. */ onRename?: (filename: string) => void | Promise; /** The file picked to stand in its place. */ onReplace?: (picked: File) => void | Promise; /** Confirmed here. */ onRemove?: () => void; /** The replace picker's filter. */ accept?: string; } export interface FileActsProps extends FileActsHandlers { file: DisplayFile; /** As its surface names it — a row's title — for the trigger and the questions. */ name: string; /** The host's own entries where the file IS the row (a register's line that is one paper): one ⋯, what destroys * last. */ items?: readonly ActionMenuItem[]; /** The trigger's name where the ⋯ is the row's; default the file's ("Actions: name"). */ accessibilityLabel?: string; labels?: Partial; /** Over a picture. */ elevated?: boolean; size?: IconButtonSize; } /** * A FILE'S ⋯ — Open and Download for any reader, Rename (its extension kept), Replace and a confirmed Remove where the * host passes them, and the rename they open. The kit's file surfaces (`FilesEditor`, `FileRows`, `MediaView`) stand * one on every file; a host draws it where the file is its own row. */ export declare function FileActs(props: FileActsProps): React.JSX.Element;