import type { ReactiveController, ReactiveControllerHost } from 'lit'; interface FocusGroupOptions { getItems: () => HTMLElement[]; getSelectedIndex: () => number; getOrientation: () => 'horizontal' | 'vertical'; getActivation: () => 'auto' | 'manual'; /** requests a selection commit (0-based) */ onSelect: (index: number) => void; /** reveals an item (scroll into view) */ onReveal: (item: HTMLElement) => void; } interface FocusGroupControllerHost extends ReactiveControllerHost { shadowRoot: ShadowRoot | null; } /** * `FocusGroupController` * * Orchestrates the focus-driven interaction of a composite widget, following * the Open UI `focusgroup` model where focus movement and selection are * decoupled: * * - Entry-point management is delegated to an engine (the roving-tabindex * fallback engine today; the native `focusgroup` attribute in Phase 3). * - Commit triggers: `focusin` (auto activation), and click / Enter / Space * (both activation modes). Directional navigation only moves DOM focus. * - Focus is placed exclusively inside user-interaction handlers. The commit * pipeline (`selected` -> SelectionController) NEVER moves focus, which * makes programmatic selection changes focus-safe by construction * (structural event-origin tracking; no focus latch anywhere). */ export declare class FocusGroupController implements ReactiveController { #private; host: FocusGroupControllerHost; constructor(host: FocusGroupControllerHost, { getItems, getSelectedIndex, getOrientation, getActivation, onSelect, onReveal, }: FocusGroupOptions); get entryItem(): HTMLElement; hostConnected(): void; hostDisconnected(): void; /** * @param container the tablist container in the host's shadow DOM */ attach(container: HTMLElement | undefined): void; /** * Pushes an `orientation` change to the engine. The native engine encodes * the axis in the `focusgroup` token and must be synced explicitly; the * fallback reads orientation live and treats this as a no-op. */ syncOrientation(): void; /** * Moves the group's entry point to the currently selected item. Idempotent; * call on every selection commit and whenever the slotted items change. */ syncEntryPoint(): void; } export {};