import { type RefObject } from "react"; /** * The chat header's optional parts, most important first. The header is always * one row: when the title would be squeezed below its readable width, parts * leave the row from the end of this list and live in the "…" menu instead; * they come back once there is room again. One rule for every screen size, so * no part needs its own breakpoint. A part that can shrink (flex-shrink above * 1, like the automation chip's words) gives way first, down to its minimum * width, before anything leaves. */ export declare const SESSION_HEADER_PARTS: readonly ["panel", "status", "access", "fullAccess", "automations", "pin", "find", "machine", "site", "slackAgent", "model", "accessKey"]; export type SessionHeaderPart = (typeof SESSION_HEADER_PARTS)[number]; export type SessionHeaderOverflow = { /** Parts that are in the "…" menu instead of the row. */ collapsed: ReadonlySet; /** The row that holds the title and the parts beside it. */ rowRef: RefObject; /** The title's own box inside that row. */ titleRef: RefObject; /** The action cluster on the header's other side. */ clusterRef: RefObject; /** Stable ref for the element that is one part, measured while it is in the row. */ partRef: (part: SessionHeaderPart) => (element: HTMLElement | null) => void; }; /** * Keeps the header on one row by moving the least important parts into the * "…" menu when the title would get too narrow. `present` lists the parts this * chat has; `contentKey` changes whenever the title's text does; `resetKey` * (the chat) starts over with every part in the row; `frozen` holds the * current layout (while renaming). */ export declare function useSessionHeaderOverflow({ present, contentKey, resetKey, frozen, }: { present: readonly SessionHeaderPart[]; contentKey: string; resetKey: string; frozen: boolean; }): SessionHeaderOverflow;