import { type ToolRailHandle, type ToolRailProps, type ToolRailTool } from '../tool-rail'; /** A Control Room tool — the rail tool descriptor, `scope`-aware. */ export type ControlRoomTool = ToolRailTool; /** Imperative handle — open / collapse a tool panel without the DOM. */ export type ControlRoomRailHandle = ToolRailHandle; /** What one favourites write did, for the tool the user acted on. */ export interface ControlRoomFavoriteChange { toolId: string; action: 'pin' | 'unpin' | 'reorder'; } export interface ControlRoomRailProps extends Omit { /** * Explicit tool set. Omit to read the merged global + contextual tools from * the nearest `` (+ `useControlRoomTools`). */ tools?: ControlRoomTool[]; /** * Enable the favourites model: a pinned top group, drag / `Alt`+Arrow * reordering, and the panel-header add / remove control. Default `true`. Set * `false` for the legacy flat strip (tools render in the order / `scope` you * pass, no drag, no panel-header control). */ reorderable?: boolean; /** * Controlled favourite tool ids, in pinned order. When set, the rail does not * persist — the host owns the value and is notified via `onFavoriteIdsChange`. * Ids of tools that are not in `tools` right now are allowed: the rail hides * them and hands them back in `next`. */ favoriteIds?: string[]; /** * HARD-PINNED favourite ids — always rendered at the very START of the * pinned group, ahead of (and deduped from) user favourites, in both * controlled and uncontrolled modes. Immune to unpin: removing one via * the panel-header control or a drag is a no-op (it re-pins on the next * render). For tools the product wants permanently one glance away — * e.g. notifications at the top of the strip. */ pinnedFavoriteIds?: string[]; /** * Uncontrolled initial favourites. Defaults to the ids of the tools the host * marked `scope: 'global'` (Alia, Inbox) — pinning them on top by default. * Read once, on the first mount, and only when storage holds nothing: a * rail that first mounts before its tools arrive seeds no favourites, so * mount it with its tools or pass this. */ defaultFavoriteIds?: string[]; /** Fires with the next favourites order whenever the user pins / reorders. * `next` keeps the favourites of tools that are absent right now, in * their places, so store it as given. `change` names the tool acted on * and what happened to it; it is absent when the write changed nothing. */ onFavoriteIdsChange?: (next: string[], change?: ControlRoomFavoriteChange) => void; /** localStorage key for the uncontrolled favourites. Favourites of tools * that are absent right now stay in storage and come back with the tool. * Read once, on the first mount: a later change writes the current * favourites under the new key instead of reading it. Pass the final * (per-user) key from the first render, or remount with * `key={persistFavoritesKey}`. */ persistFavoritesKey?: string; /** * localStorage key for the uncontrolled committed panel width, mirroring * `persistFavoritesKey`: when set and `panelWidth` is absent, the rail * seeds its width from storage on mount and writes each commit back. * Unlike `persistFavoritesKey` this has no default — persistence is * opt-in. Only meaningful with `resizablePanel` — there is nothing to * persist without the resize handle. */ persistPanelWidthKey?: string; } export declare const ControlRoomRail: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=control-room-rail.d.ts.map