import "./folder_switcher.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type Picture } from "./avatar"; import { type StyleProps } from "./style_props"; /** One row of the folder entity: a project, a branch, a season. */ export interface FolderSwitcherFolder { id: string; /** Its title. */ label: string; /** Its picture — a video draws its first frame; without one, its initials. */ image?: Picture | null; /** The screen's rows filed under it, after its name in the menu. */ count?: number; } /** Prop → `LoticsLocale.folderSwitcher` → English default. */ export interface FolderSwitcherLabels { /** The row that leaves every folder for the list of them. */ all: string; search: string; noResults: string; /** The trigger's name, opening with the folder's own words (label-in-name). */ switch: (folder: string) => string; } export interface FolderSwitcherProps extends StyleProps { /** The folder the screen works inside, drawn as the trigger. */ current: FolderSwitcherFolder; /** The menu's rows: every folder, or the caller's answer to `onSearch`. */ folders: readonly FolderSwitcherFolder[]; /** A folder picked, or `null` for the leading "all folders" row — back to the list of them. */ onChange: (id: string | null) => void; /** Present, the search is the caller's (a server search over more folders than loaded); absent, the menu * filters `folders` itself. */ onSearch?: (query: string) => void; /** The caller's search is running. */ loading?: boolean; /** A line under the menu saying what it does not hold — the first folders of more than it read. */ note?: string; labels?: Partial; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * WHERE A SCREEN WORKS INSIDE — one row of another entity it is scoped to, named in the screen's header as * its mark and title. Pressed, a searchable menu of the folders, each with its count, led by "all * folders", which leaves the folder for the list of them. There is no "all" INSIDE a folder: the pick * narrows every read the screen makes. */ export declare function FolderSwitcher(props: FolderSwitcherProps): React.JSX.Element;