import * as Common from '../../core/common/common.js';
import * as Platform from '../../core/platform/platform.js';
import * as Geometry from '../../models/geometry/geometry.js';
import { type LitTemplate } from '../../ui/lit/lit.js';
import { Icon } from '../kit/kit.js';
import { ContextMenu } from './ContextMenu.js';
import type { Toolbar } from './Toolbar.js';
import { type AnyWidget, VBox, WidgetElement } from './Widget.js';
export interface TabInfo {
    id: string;
    title: string;
    view: AnyWidget;
    tabTooltip?: string;
    isCloseable?: boolean;
    previewFeature?: boolean;
    index?: number;
    jslogContext?: string;
    enabled?: boolean;
    selected?: boolean;
}
declare const TabbedPane_base: (new (...args: any[]) => {
    __events: Common.ObjectWrapper.ObjectWrapper<EventTypes>;
    addEventListener<T extends keyof EventTypes>(eventType: T, listener: (arg0: Common.EventTarget.EventTargetEvent<EventTypes[T], any>) => void, thisObject?: Object): Common.EventTarget.EventDescriptor<EventTypes, T>;
    once<T extends keyof EventTypes>(eventType: T): Promise<EventTypes[T]>;
    removeEventListener<T extends keyof EventTypes>(eventType: T, listener: (arg0: Common.EventTarget.EventTargetEvent<EventTypes[T], any>) => void, thisObject?: Object): void;
    hasEventListeners(eventType: keyof EventTypes): boolean;
    dispatchEventToListeners<T extends keyof EventTypes>(eventType: Platform.TypeScriptUtilities.NoUnion<T>, ...eventData: Common.EventTarget.EventPayloadToRestParameters<EventTypes, T>): void;
    dispatchDOMEvent?(event: Event): void;
}) & typeof VBox;
export declare class TabbedPane extends TabbedPane_base {
    #private;
    protected readonly headerContentsElement: HTMLElement;
    tabSlider: HTMLDivElement;
    readonly tabsElement: HTMLElement;
    private readonly tabsHistory;
    tabsById: Map<string, TabbedPaneTab>;
    private currentTabLocked;
    private autoSelectFirstItemOnShow;
    private triggerDropDownTimeout;
    private dropDownButton;
    private currentDevicePixelRatio;
    private shrinkableTabs?;
    private verticalTabLayout?;
    private closeableTabs?;
    private delegate?;
    private currentTab?;
    private sliderEnabled?;
    private placeholderElement?;
    private focusedPlaceholderElement?;
    private placeholderContainerElement?;
    private lastSelectedOverflowTab?;
    private measuredDropDownButtonWidth?;
    allowTabReorder?: boolean;
    private automaticReorder?;
    constructor(element?: HTMLElement);
    setAccessibleName(name: string): void;
    setCurrentTabLocked(locked: boolean): void;
    setAutoSelectFirstItemOnShow(autoSelect: boolean): void;
    get visibleView(): AnyWidget | null;
    tabIds(): string[];
    tabIndex(tabId: string): number;
    tabViews(): AnyWidget[];
    tabView(tabId: string): AnyWidget | null;
    get selectedTabId(): string | null;
    setShrinkableTabs(shrinkableTabs: boolean): void;
    makeVerticalTabLayout(): void;
    setCloseableTabs(closeableTabs: boolean): void;
    focus(): void;
    focusSelectedTabHeader(): void;
    headerElement(): Element;
    tabbedPaneContentElement(): Element;
    setTabDelegate(delegate: TabbedPaneTabDelegate): void;
    appendTab(id: string, tabTitle: string, view: AnyWidget, tabTooltip?: string, userGesture?: boolean, isCloseable?: boolean, isPreviewFeature?: boolean, index?: number, jslogContext?: string): void;
    closeTab(id: string, userGesture?: boolean): void;
    closeTabs(ids: string[], userGesture?: boolean): void;
    hasTab(tabId: string): boolean;
    otherTabs(id: string): string[];
    tabsToTheRight(id: string): string[];
    private viewHasFocus;
    selectTab(id: string, userGesture?: boolean, forceFocus?: boolean): boolean;
    selectNextTab(): void;
    selectPrevTab(): void;
    getTabIndex(id: string): number;
    moveTabBackward(id: string, index: number): void;
    moveTabForward(id: string, index: number): void;
    lastOpenedTabIds(tabsCount: number): string[];
    setTabIcon(id: string, icon: Icon | null): void;
    setTrailingTabIcon(id: string, icon: Icon | LitTemplate | null): void;
    setSuffixElement(id: string, suffixElement: HTMLElement | LitTemplate | null): void;
    setBadge(id: string, content: string | null): void;
    setTabEnabled(id: string, enabled: boolean): void;
    tabIsDisabled(id: string): boolean;
    tabIsEnabled(id: string): boolean;
    private zoomChanged;
    protected clearMeasuredWidths(): void;
    changeTabTitle(id: string, tabTitle: string, tabTooltip?: string): void;
    changeTabView(id: string, view: AnyWidget): void;
    get tabs(): TabInfo[];
    set tabs(tabs: TabInfo[]);
    onResize(): void;
    headerResized(): void;
    wasShown(): void;
    wasHidden(): void;
    makeTabSlider(): void;
    private setTabSlider;
    calculateConstraints(): Geometry.Constraints;
    setPlaceholderElement(element: Element, focusedElement?: Element): void;
    waitForTabElementUpdate(): Promise<void>;
    updateTabAnnotationIcons(): void;
    performUpdate(): void;
    private adjustToolbarWidth;
    private hideTabElement;
    private createDropDownButton;
    private dropDownClicked;
    private dropDownKeydown;
    private dropDownMenuItemSelected;
    private totalWidth;
    private numberOfTabsShown;
    private updateTabsDropDown;
    private maybeShowDropDown;
    /**
     * Returns the tabs that are currently hidden because of overflow, in
     * tab order. Mirrors the payload of the `overflow-tabs-changed` event.
     */
    hiddenTabs(): Array<{
        id: string;
        title: string;
        jslogContext?: string;
    }>;
    /**
     * Returns the index in tab order of the first overflowed (hidden) tab,
     * or -1 if every tab fits.
     */
    firstHiddenTabIndex(): number;
    /**
     * Reorders `tabId` to position `newIndex` in the tab list. Unlike
     * {@link insertBefore}, this does not require the tab to currently be in
     * the DOM (overflowed tabs are detached). The change is persisted via the
     * {@link Events.TabOrderChanged} event so the new order survives across
     * DevTools reloads.
     */
    moveTab(tabId: string, newIndex: number): void;
    private measureDropDownButton;
    private updateWidths;
    private measureWidths;
    private calculateMaxWidth;
    private tabsToShowIndexes;
    private hideCurrentTab;
    private showTab;
    updateTabSlider(): void;
    private hideTab;
    elementsToRestoreScrollPositionsFor(): Element[];
    insertBefore(tab: TabbedPaneTab, index: number): void;
    leftToolbar(): Toolbar;
    rightToolbar(): Toolbar;
    setAllowTabReorder(allow: boolean, automatic?: boolean): void;
    setTabAnnotationIcon(id: string, iconVisible: boolean): void;
    private keyDown;
}
export interface EventData {
    prevTabId?: string;
    tabId: string;
    view?: AnyWidget;
    isUserGesture?: boolean;
}
export declare enum Events {
    TabInvoked = "TabInvoked",
    TabSelected = "TabSelected",
    TabClosed = "TabClosed",
    TabOrderChanged = "TabOrderChanged",
    PaneVisibilityChanged = "PaneVisibilityChanged"
}
export interface EventTypes {
    [Events.TabInvoked]: EventData;
    [Events.TabSelected]: EventData;
    [Events.TabClosed]: EventData;
    [Events.TabOrderChanged]: EventData;
    [Events.PaneVisibilityChanged]: {
        isVisible: boolean;
    };
}
export declare class TabbedPaneTab {
    #private;
    closeable: boolean;
    previewFeature: boolean;
    private readonly tabbedPane;
    shown: boolean;
    measuredWidth: number | undefined;
    private icon;
    private suffixElement;
    private delegate?;
    private titleElement?;
    private dragStartX?;
    constructor(tabbedPane: TabbedPane, id: string, title: string, closeable: boolean, previewFeature: boolean, view: AnyWidget, tooltip?: string, jslogContext?: string);
    get id(): string;
    get title(): string;
    set title(title: string);
    get jslogContext(): string;
    set jslogContext(jslogContext: string | undefined);
    get tabAnnotationIcon(): boolean;
    set tabAnnotationIcon(iconVisible: boolean);
    isCloseable(): boolean;
    setIcon(icon: Icon | null): void;
    setSuffixElement(suffixElement: HTMLElement | LitTemplate | null): void;
    toggleClass(className: string, force?: boolean): boolean;
    get view(): AnyWidget;
    set view(view: AnyWidget);
    get tooltip(): string | undefined;
    set tooltip(tooltip: string | undefined);
    get tabElement(): HTMLElement;
    width(): number;
    setWidth(width: number): void;
    setDelegate(delegate: TabbedPaneTabDelegate): void;
    private createIconElement;
    private createSuffixElement;
    private createMeasureClone;
    createTabElement(measuring: boolean): HTMLElement;
    private createTabAnnotationIcon;
    private createCloseIconButton;
    private createPreviewIcon;
    private isCloseIconClicked;
    private tabKeyDown;
    private tabClicked;
    private tabMouseDown;
    private tabMouseUp;
    private closeTabs;
    private tabContextMenu;
    private startTabDragging;
    private tabDragging;
    private endTabDragging;
}
export interface TabbedPaneTabDelegate {
    closeTabs(tabbedPane: TabbedPane, ids: string[]): void;
    onContextMenu(tabId: string, contextMenu: ContextMenu): void;
}
export declare class TabbedPaneElement extends WidgetElement<TabbedPane> {
    #private;
    constructor();
    disconnectedCallback(): void;
}
export {};
