import "./scope_switcher.css"; import type * as React from "react"; import { Menu } from "@base-ui/react/menu"; import { type StyleProps } from "./style_props"; /** Where a popover list stops being scannable and starts being a scroll — about * one popover's height at the default row rhythm. */ export declare const SCOPE_SWITCHER_SEARCH_FROM = 8; export interface ScopeSwitcherItem { id: string; label: string; /** * An identity image for this item. The marks appear as soon as ONE item * carries an image, and an item without one falls back to `Avatar`'s initials: * drawing a mark only where there is a picture shifts every unmarked label * sideways. */ imageUri?: string; } export interface ScopeSwitcherProps extends StyleProps { items: ScopeSwitcherItem[]; currentId: string | null; onSelect: (id: string) => void; /** Minimum items required to render the switcher. Below this, nothing renders. Default 2. */ minItemsToRender?: number; /** * WHAT THE TRIGGER SAYS WHILE NOTHING IS PICKED — "Pick a project". Without it * the trigger falls back to the FIRST item, a subject the reader never chose. */ placeholder?: string; /** Popup side. Default "bottom". */ side?: "top" | "bottom" | "left" | "right"; /** Popup alignment. Default "start". */ align?: "start" | "center" | "end"; /** Trigger max width in pixels. Default 180. */ maxTriggerWidth?: number; /** * Filter the list by typing. Defaults to ON past {@link SCOPE_SWITCHER_SEARCH_FROM} * items. Pass `false` to suppress it on a list that is long but ordered (a * year of months), or `true` to force it on a short one that is hard to scan. */ searchable?: boolean; testID?: string; /** Base UI's own trigger ref — the part this entry IS. */ ref?: React.Ref; render?: Menu.Trigger.Props["render"]; } /** * Generic pill-style switcher: a trigger showing the current selection, and a * menu listing all items as a radio group — so the current one announces as * checked rather than merely wearing a glyph. Fully presentational. */ export declare function ScopeSwitcher(props: ScopeSwitcherProps): React.JSX.Element | null;