/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { StorageLayer } from "../../../utils/storage-helper";
export type TabId = string;
export declare enum TabKind {
    TERMINAL = "terminal",
    CREATE_RESOURCE = "create-resource",
    EDIT_RESOURCE = "edit-resource",
    INSTALL_CHART = "install-chart",
    UPGRADE_CHART = "upgrade-chart",
    POD_LOGS = "pod-logs"
}
/**
 * This is the storage model for dock tabs.
 *
 * All fields are required.
 */
export type DockTab = Required<DockTabCreate>;
/**
 * These are the arguments for creating a new Tab on the dock
 */
export interface DockTabCreate {
    /**
     * The ID of the tab for reference purposes.
     */
    id?: TabId;
    /**
     * What kind of dock tab it is
     */
    kind: TabKind;
    /**
     * The tab's title, defaults to `kind`
     */
    title?: string;
    /**
     * If true then the dock entry will take up the whole view and will not be
     * closable.
     */
    pinned?: boolean;
    /**
     * Extra fields are supported.
     */
    [key: string]: any;
}
/**
 * This type is for function which specifically create a single type of dock tab.
 *
 * That way users should get a type error if they try and specify a `kind`
 * themselves.
 */
export type DockTabCreateSpecific = Omit<DockTabCreate, "kind">;
export interface DockStorageState {
    height: number;
    tabs: DockTab[];
    selectedTabId?: TabId;
    isOpen: boolean;
}
export interface DockTabChangeEvent {
    tab: DockTab;
    tabId: TabId;
    prevTab?: DockTab;
}
export interface DockTabChangeEventOptions {
    /**
     * apply a callback right after initialization
     */
    fireImmediately?: boolean;
    /**
     * filter: by dockStore.selectedTab.kind == tabKind
     */
    tabKind?: TabKind;
    /**
     * filter: dock and selected tab should be visible (default: true)
     */
    dockIsVisible?: boolean;
}
export interface DockTabCloseEvent {
    tabId: TabId;
}
interface Dependencies {
    readonly storage: StorageLayer<DockStorageState>;
    readonly tabDataClearers: Record<TabKind, (tabId: TabId) => void>;
    readonly tabDataValidator: Partial<Record<TabKind, (tabId: TabId) => boolean>>;
}
export declare class DockStore implements DockStorageState {
    private readonly dependencies;
    constructor(dependencies: Dependencies);
    readonly minHeight = 100;
    fullSize: boolean;
    get isOpen(): boolean;
    set isOpen(isOpen: boolean);
    get height(): number;
    set height(height: number);
    get tabs(): DockTab[];
    set tabs(tabs: DockTab[]);
    get selectedTabId(): TabId | undefined;
    set selectedTabId(tabId: TabId | undefined);
    get tabsNumber(): number;
    get selectedTab(): Required<DockTabCreate> | undefined;
    get maxHeight(): number;
    protected adjustHeight(): void;
    onResize(callback: () => void, opts?: {
        fireImmediately?: boolean;
    }): import("mobx").IReactionDisposer;
    onTabClose(callback: (evt: DockTabCloseEvent) => void, opts?: {
        fireImmediately?: boolean;
    }): import("mobx").IReactionDisposer;
    onTabChange(callback: (evt: DockTabChangeEvent) => void, options?: DockTabChangeEventOptions): import("mobx").IReactionDisposer;
    hasTabs(): boolean;
    open(fullSize?: boolean): void;
    close(): void;
    toggle(): void;
    toggleFillSize(): void;
    getTabById(tabId: TabId): Required<DockTabCreate> | undefined;
    getTabIndex(tabId: TabId): number;
    protected getNewTabNumber(kind: TabKind): number;
    createTab: (rawTabDesc: DockTabCreate, addNumber?: boolean) => DockTab;
    closeTab(tabId: TabId): void;
    closeTabs(tabs: DockTab[]): void;
    closeAllTabs(): void;
    closeOtherTabs(tabId: TabId): void;
    closeTabsToTheRight(tabId: TabId): void;
    renameTab(tabId: TabId, title: string): void;
    selectTab(tabId: TabId): void;
    reset(): void;
}
export {};
