import { Misc, Model } from '@singularsystems/neo-core'; export interface ITabManager { selectedTab: string; /** * Registers a callback to run when the tab is first displayed, or when reset is called with reInitialise=true. */ onTabInitialise(tabKey: string, callback: () => void): ITabManager; /** * Registers a callback to run whenever the tab with this tab key is displayed. */ onTabDisplayed(tabKey: string, callback: () => void): ITabManager; } /** * Tab manager used to manage a tab component. * @param T string union type of tab names. */ export declare class TabManager implements Misc.IDisposable { private autoSelectFirstTab; private reactionDisposer; observable: Model.IObservableValue; /** * Creates a tab manager used to bind to a tab container. * @param selectedTab Initially selected tab. * @param autoSelectFirstTab Set to true if the first child tab should become selected. */ constructor(selectedTab?: T, autoSelectFirstTab?: boolean, observable?: Model.IObservableValue); get selectedTab(): T; set selectedTab(value: T); /** * Registers a callback to run when the tab is first displayed, or when reset is called with reInitialise=true. */ onTabInitialise(tabKey: T, callback: () => void): this; /** * Registers a callback to run whenever the tab with this tab key is displayed. */ onTabDisplayed(tabKey: T, callback: () => void): this; private getTab; /** * Marks the tab as 'initial'. * @param reInitialise True if the tabs onInitialise() should be invoked. */ reset(tabKey: T, reInitialise?: boolean): void; /** Calls onInitialise() if the tab has not yet initialised. */ initialiseTab(tabKey: T): void; /** * Marks all tabs as 'initial', causing onInitialise() to be called the next time each is displayed. * @param reInitialise True if the onInitialise() should be called on the currently displayed tab. */ resetAll(reInitialise?: boolean): void; private tabs; private onTabChanged; dispose(): void; }