import * as React from 'react'; import { Omit } from '../../common'; import { TabItemProps } from '../ContentSwitch/ContentSwitch.part'; export interface TabControlItem { /** * The element to be shown. */ element: React.ReactNode; /** * Gets if the item is currently active. */ active: boolean; /** * Callback to use when the item should be active. */ onSelect(): void; } export interface TabChangeEvent { /** * The previously selected tab / index. */ previousIndex: number; /** * The currently selected tab / index. */ selectedIndex: number; } export interface TabOptions { /** * The default index - only set for use in automatic mode. */ defaultIndex?: number; /** * The currently selected index - used in the controlled mode. */ selectedIndex?: number; /** * Notification callback if the selected tab index should change. */ onTabChange?(e: TabChangeEvent): void; } /** * @deprecated */ export interface TabControlProps extends TabOptions { /** * The children, usually passed as a collection of TabPage elements. */ render(items: Array): React.ReactNode; } /** * @deprecated */ export interface TabControlState { /** * The currently selected index. */ selectedIndex: number; /** * Determines if the tab component is controlled from the outside or not. */ controlled: boolean; } /** * The functional component to handle tabs. * DEPRECATED: Please use `withTabControl` instead. * @deprecated */ export declare class TabControl extends React.PureComponent { private selects; constructor(props: TabControlProps); UNSAFE_componentWillReceiveProps(nextProps: TabControlProps): void; private changeIndex; render(): React.ReactNode; } export interface TabControlHolderProps { headers: Array; activeIndex?: number; onSelect(index: number): void; } export interface WithTabControlProps { tabItemRenderer: React.ElementType; } export declare function withTabControl(Component: React.ComponentType): React.FC> & { inner: { readonly Component: React.ComponentType; }; };