import type React from 'react'; export interface TabItem { id: string; label: string; /** Optional — text-only tabs (e.g. the homepage content-strip switcher) omit it. */ icon?: React.ComponentType>; /** * The tab's panel. Its props come from the caller's shared `componentProps` * bag (see ``, which IS generic over that bag) — but a * heterogeneous tab LIST cannot name it, and the two live usage patterns * demand OPPOSITE defaults, so no single non-`any` type serves both: * * a) panels WITH required props — `TabItem[]` holding * `ComponentType<{ scheduleId: string }>` (openframe-oss-frontend's * schedule / script detail tabs). Needs a default assignable INTO every * concrete panel, i.e. `never`. * b) panels rendered straight from `getTabComponent(...)` as * `` with no props (openframe-oss-frontend's customers / * settings / scripts pages). Needs a default the empty prop bag * satisfies, i.e. `Record`. * * Verified with a generic `TabItem

` against both * patterns: `Record` rejects (a) (TS2322 — "Property * 'scheduleId' is missing"), `never` rejects (b) (TS2769/TS2786 — "'C' cannot * be used as a JSX component"). Typing this therefore means migrating the * consumers to `TabItem`, not changing this line. */ component?: React.ComponentType; indicator?: 'success' | 'warning' | 'error'; } export interface TabNavigationUrlSyncOptions { paramName?: string; replaceState?: boolean; } interface TabNavigationProps { activeTab?: string; onTabChange?: (tabId: string) => void; tabs: TabItem[]; className?: string; shadowClassName?: string; /** Force the right-edge gradient to always render, independent of scroll state. */ showRightGradient?: boolean; /** Force the left-edge gradient to always render, independent of scroll state. */ showLeftGradient?: boolean; /** Tabs grow to share the bar's full width equally (Figma segmented-underline * look, e.g. the 480px homepage strip switcher). Default: natural width. */ stretchTabs?: boolean; urlSync?: boolean | TabNavigationUrlSyncOptions; defaultTab?: string; /** * Render prop for the tab BODY. Receives the tab to render and, additively, * a `isStale` flag — true while the bar has already moved to a newly clicked * tab but the body is still showing the PREVIOUS one (see `deferredActiveTab` * below). Use it to dim the body or show a pending hint; without it a slow * tab looks like a tab that simply did nothing. */ children?: (activeTab: string, state: { isStale: boolean; }) => React.ReactNode; } export declare function TabNavigation({ activeTab: controlledActiveTab, onTabChange: controlledOnTabChange, tabs, className, shadowClassName, showRightGradient, showLeftGradient, stretchTabs, urlSync, defaultTab, children, }: TabNavigationProps): React.JSX.Element; export declare const getTabById: (tabs: TabItem[], tabId: string) => TabItem | undefined; export declare const getTabComponent: (tabs: TabItem[], tabId: string) => TabItem["component"] | null; export {}; //# sourceMappingURL=tab-navigation.d.ts.map