/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { ReactiveController, ReactiveControllerHost } from 'lit'; import { TabItem, TabPopOutConfig, PoppedOutTab, TabsPanelConfig } from '../tabs.types.js'; /** * Host interface for tabs pop-out controller */ export interface TabsPopOutHost extends ReactiveControllerHost { /** Tab items array */ tabs: TabItem[]; /** Pop-out configuration */ popOut?: TabPopOutConfig; /** Panel configuration for making tabs pannable */ panelConfig?: TabsPanelConfig; /** Method to dispatch custom events */ dispatchEventWithMetadata(eventName: string, detail: any): void; /** Method to check if a component is available */ isComponentAvailable(componentName: string): boolean; /** Method to request update */ requestUpdate(): void; } /** * Controller for managing tab pop-out functionality */ export declare class TabsPopOutController implements ReactiveController { private host; private poppedOutTabs; private popOutIdCounter; constructor(host: TabsPopOutHost); hostConnected(): void; hostDisconnected(): void; /** * Initialize pop-out states for all tabs */ private initializeTabStates; /** * Check if pop-out functionality is enabled */ isPopOutEnabled(): boolean; /** * Check if a specific tab can be popped out */ canPopOut(tab: TabItem): boolean; /** * Check if a specific tab can be popped back in */ canPopIn(tab: TabItem): boolean; /** * Generate unique pop-out ID */ private generatePopOutId; /** * Pop out a tab to a window panel */ popOutTab(tabIndex: number): Promise; /** * Pop a tab back into the tabs container */ popInTab(popOutId: string): Promise; /** * Create window panel for popped-out tab */ private createWindowPanel; /** * Destroy window panel */ private destroyWindowPanel; /** * Clean up all popped-out tabs */ private cleanupPoppedOutTabs; /** * Get all currently popped-out tabs */ getPoppedOutTabs(): PoppedOutTab[]; /** * Check if any tabs are currently popped out */ hasPopppedOutTabs(): boolean; /** * Handle tab removal - clean up if tab is popped out */ handleTabRemoval(tabIndex: number): void; /** * Public method to be called from tab component */ handlePopOutRequest(tabIndex: number): Promise; /** * Public method to be called from panel or placeholder */ handlePopInRequest(popOutId: string): Promise; } //# sourceMappingURL=popout.controller.d.ts.map