import type { JSX, ReactNode } from 'react'; export type TabId = string | number; export type TabItem = { header: string; id: TabId; headerIcon?: ReactNode; content: ReactNode; disabled?: boolean; hidden?: boolean; badge?: number | string; removable?: boolean; }; type TabsVariant = 'filled' | 'outlined'; export interface TabsProps { header?: string; subheader?: ReactNode; variant: TabsVariant; panelStyle?: boolean; /** Data-driven API */ tabs?: TabItem[]; /** Controlled */ value?: TabId; /** Uncontrolled initial */ defaultValue?: TabId; /** * Persist the active tab id in localStorage when used uncontrolled. * Ignored in controlled mode. */ storageKey?: string; onValueChange?: (id: TabId, tab: TabItem, index: number) => void; /** Called when a removable tab's remove button is pressed. The caller owns removing the tab. */ onRemoveTab?: (id: TabId, tab: TabItem, index: number) => void; /** Shows an add-tab button and notifies the caller. The caller owns creating and selecting the tab. */ onAddTab?: () => void; addition?: ReactNode; /** Extra content rendered in the tab-list row, next to the tab buttons (e.g. filters). */ tabListAddition?: ReactNode; loading?: boolean; /** Composition API */ children?: ReactNode; } export interface TabsItemProps { id: TabId; header: string; headerIcon?: ReactNode; disabled?: boolean; hidden?: boolean; badge?: number; removable?: boolean; children?: ReactNode; } type SlotName = 'Item'; type TabsItemComponent = ((props: TabsItemProps) => JSX.Element) & { __TABS_SLOT__?: SlotName; }; export declare function Tabs({ header, subheader, variant, panelStyle, tabs, value, defaultValue, storageKey, onValueChange, onRemoveTab, onAddTab, addition, tabListAddition, loading, children, }: TabsProps): JSX.Element; export declare namespace Tabs { var Item: TabsItemComponent; } export {};