import { type TabDefinition, type TabSetDefinition } from '@byline/core'; /** One tab set, resolved against live form data and current errors. */ export interface ResolvedTabSet { /** Tabs whose `condition` is satisfied, in declaration order. */ visibleTabs: TabDefinition[]; /** The tab that should render, after falling back off a hidden selection. */ activeTabName: string; activeTab: TabDefinition | undefined; /** Error count per tab name, for the tab bar's badges. */ errorCounts: Record | undefined; } export interface UseFormTabsResult { resolve: (set: TabSetDefinition) => ResolvedTabSet; errorCountsBySet: Record>; } /** * Tab visibility, per-tab error counts, and fallback when the selected tab is * hidden. * * It deliberately does **not** own the selection. `FormRenderer` lifts that * above the keyed `FormProvider` so the editor's tab choices survive the * remount a locale change triggers; a hook living inside that subtree would * lose them on every switch. The selection arrives as `activeTabBySet` and * changes are reported upward. */ export declare function useFormTabs(fieldToTabPath: Map, activeTabBySet: Record, tabSets: TabSetDefinition[]): UseFormTabsResult;