import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core'; import { Subject } from 'rxjs'; import { Bem } from '../utils/bem'; import { TabHeaderAddonDirective } from './tab-directives'; import { TabHeaderComponent } from './tab-header.component'; import { TabComponent } from './tab.component'; import { TabSize, TabType } from './tabs.types'; /** A simple change event emitted on focus or selection changes. */ export declare class TabChangeEvent { /** Index of the currently-selected tab. */ index: number; /** Reference to the currently-selected tab. */ tab: TabComponent; } export declare class TabGroupComponent implements OnChanges, AfterContentChecked, AfterContentInit, OnDestroy { private _changeDetectorRef; bem: Bem; _tabs: QueryList; _headerAddon: TabHeaderAddonDirective; _tabHeader: TabHeaderComponent; /** The tab index that should be selected after the content has been checked. */ private _indexToSelect; /** Subscription to tabs being added/removed. */ private _tabsSubscription; /** Subscription to changes in the tab labels. */ private _tabLabelSubscription; private _type; private _size; private _previousHeaderAddon; /** Emits whenever the type changes */ readonly _typeChange: Subject; /** Emits whenever the size changes */ readonly _sizeChange: Subject; /** Emits whenever the size changes */ readonly _addonChange: Subject; /** The index of the active tab. */ selectedIndex: number | null; private _selectedIndex; type: TabType; size: TabSize; /** Output to enable support for two-way binding on `[(selectedIndex)]` */ readonly selectedIndexChange: EventEmitter; /** Event emitted when the tab selection has changed. */ readonly selectedTabChange: EventEmitter; /** Event emitted when focus has changed within a tab group. */ readonly focusChange: EventEmitter; constructor(_changeDetectorRef: ChangeDetectorRef); readonly activeTab: TabComponent; ngOnChanges(changes: SimpleChanges): void; /** * After the content is checked, this component knows what tabs have been defined * and what the selected index should be. This is where we can know exactly what position * each tab should be in according to the new selected index. */ ngAfterContentChecked(): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** Handle click events, setting new selected index if appropriate. */ _handleClick(tab: TabComponent, idx: number): void; _focusChanged(index: number): void; /** Re-aligns the ink bar to the selected tab element. */ realignActiveIndicator(): void; /** Clamps the given index to the bounds of 0 and the tabs length. */ private _clampTabIndex; private _createChangeEvent; /** * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is * on the Tab component, whereas the data binding is inside the TabGroup. In order for the * binding to be updated, we need to subscribe to changes in it and trigger change detection * manually. */ private _subscribeToTabLabels; /** Retrieves the tabindex for the tab. */ _getTabIndex(tab: TabComponent, idx: number): number | null; }