/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { WebSocketApiDependencies, WebSocketEvents } from "./websocket-api";
import { WebSocketApi } from "./websocket-api";
import type { Logger } from "@openlens/logger";
import { type TerminalMessage } from "../../common/terminal/channels";
declare enum TerminalColor {
    RED = "\u001B[31m",
    GREEN = "\u001B[32m",
    YELLOW = "\u001B[33m",
    BLUE = "\u001B[34m",
    MAGENTA = "\u001B[35m",
    CYAN = "\u001B[36m",
    GRAY = "\u001B[90m",
    LIGHT_GRAY = "\u001B[37m",
    NO_COLOR = "\u001B[0m"
}
export interface TerminalApiQuery extends Record<string, string | undefined> {
    id: string;
    node?: string;
    type?: string;
}
export interface TerminalEvents extends WebSocketEvents {
    ready: () => void;
    connected: () => void;
}
export interface TerminalApiDependencies extends WebSocketApiDependencies {
    readonly hostedClusterId: string;
    readonly logger: Logger;
}
export declare class TerminalApi extends WebSocketApi<TerminalEvents> {
    protected readonly dependencies: TerminalApiDependencies;
    protected readonly query: TerminalApiQuery;
    protected size?: {
        width: number;
        height: number;
    };
    isReady: boolean;
    constructor(dependencies: TerminalApiDependencies, query: TerminalApiQuery);
    connect(): Promise<void>;
    sendMessage(message: TerminalMessage): void;
    sendTerminalSize(cols: number, rows: number): void;
    protected _onMessage({ data, ...evt }: MessageEvent<string>): void;
    protected _onOpen(evt: Event): void;
    protected _onClose(evt: CloseEvent): void;
    protected emitStatus(data: string, options?: {
        color?: TerminalColor;
        showTime?: boolean;
    }): void;
    protected emitError(error: string): void;
}
export {};
