import { type ReactNode } from "react"; import { type IUiResizableSidebarState } from "./types.js"; /** * Collapse toggles under one provider register here, so the control whose activation made it unusable can * hand keyboard focus to another one, even one that mounts later. * * @internal */ export interface IUiResizableSidebarFocusRegistry { /** * Registers a mounted toggle and returns the function that unregisters it. A toggle that mounts while * a hand-off is waiting takes focus right away. */ register: (button: HTMLButtonElement) => () => void; /** * Called by the control whose activation changed the collapse state. The control keeps focus while it * stays usable; otherwise another usable toggle takes it, or the next toggle to mount does. */ handOff: (activated: HTMLButtonElement | null) => void; } /** * @internal */ export interface IUiResizableSidebarProviderProps { value: IUiResizableSidebarState; children: ReactNode; } /** * Shares one sidebar state between the sidebar and controls rendered outside it. * * @internal */ export declare function UiResizableSidebarProvider({ value, children }: IUiResizableSidebarProviderProps): import("react/jsx-runtime").JSX.Element; export declare function useUiResizableSidebarFocusRegistry(): IUiResizableSidebarFocusRegistry | undefined; /** * Returns the sidebar state shared by the nearest {@link UiResizableSidebarProvider}, or undefined outside one. */ export declare function useOptionalUiResizableSidebar(): IUiResizableSidebarState | undefined; /** * Returns the sidebar state shared by the nearest {@link UiResizableSidebarProvider}. * * @param fallback - State to use when rendered outside a provider, e.g. a fixed sidebar that cannot be * resized. Without a fallback, rendering outside a provider throws. * * @internal */ export declare function useUiResizableSidebar(fallback?: IUiResizableSidebarState): IUiResizableSidebarState; //# sourceMappingURL=UiResizableSidebarContext.d.ts.map