import { ColorHandle } from './color';
import { ColorManager } from './colorManager';
import { LoadRequest } from './loadRequest';
import { RpcSafeClient, VimSource } from './rpcSafeClient';
import { ILogger } from './logger';
import { Box3 } from '../utils/math3d';
type NodeState = 'visible' | 'hidden' | 'ghosted' | 'highlighted';
export declare class Vim {
    readonly source: VimSource;
    private _handle;
    private _request;
    private readonly _rpc;
    private _colors;
    private _logger;
    private _nodeStates;
    private _allNodeState;
    private _nodeColors;
    private _pendingNodeStateChanges;
    private _updateScheduled;
    /**
     * Creates an instance of the Vim class.
     * @param rpc - The RPC client used for communication.
     * @param color - The color manager for handling colors.
     * @param source - The source URL or file path of the Vim.
     * @param logger - The logger for logging messages.
     */
    constructor(rpc: RpcSafeClient, color: ColorManager, source: VimSource, logger: ILogger);
    get handle(): number;
    /**
     * Indicates whether the Vim is connected.
     * @returns True if connected; otherwise, false.
     */
    get connected(): boolean;
    /**
     * Connects to the Vim and initiates loading.
     * @returns The load request associated with this operation.
     */
    connect(): LoadRequest;
    private reapplyNodes;
    private reapplyColors;
    /**
     * Disconnects the Vim and unloads it from the server.
     */
    disconnect(): void;
    /**
     * Requests for the server to load the given URL or file path.
     * @param source - The URL or file path to load.
     * @param result - The load request object to update.
     * @returns The updated load request.
     */
    private _load;
    private getErrorType;
    private _getHandle;
    /**
     * Shows the given nodes.
     * @param nodes - The nodes to show. If 'all' is passed, all nodes will be shown.
     */
    show(nodes: number[] | 'all'): void;
    /**
     * Hides the given nodes.
     * @param nodes - The nodes to hide. If 'all' is passed, all nodes will be hidden.
     */
    hide(nodes: number[] | 'all'): void;
    /**
     * Ghosts the given nodes.
     * @param nodes - The nodes to ghost. If 'all' is passed, all nodes will be ghosted.
     */
    ghost(nodes: number[] | 'all'): void;
    /**
     * Highlights the given nodes.
     * @param nodes - The nodes to highlight. If 'all' is passed, all nodes will be highlighted.
     */
    highlight(nodes: number[] | 'all'): void;
    /**
     * Removes the highlight from the given nodes and reverts them to a fallback state.
     * @param nodes - The nodes to remove the highlight from.
     * @param fallback - The state to revert the nodes to.
     */
    removeHighlight(nodes: number[] | 'all', fallback: NodeState): void;
    /**
     * Retrieves the bounding box of the given nodes.
     * @param nodes - The nodes to get the bounding box for.
     * @returns A Promise that resolves to the bounding box, or undefined if not connected or nodes are empty.
     * @throws Error if 'all' is passed, as this feature is not supported yet.
     */
    getBoundingBox(nodes: number[] | 'all'): Promise<Box3 | undefined>;
    /**
     * Applies a color to the given nodes.
     * @param color - The color to apply.
     * @param nodes - The nodes to apply the color to.
     */
    applyColor(color: ColorHandle | undefined, nodes: number[]): void;
    /**
     * Applies an array of colors to the given nodes.
     * @param color - An array of colors to apply, corresponding to each node.
     * @param nodes - The nodes to apply the colors to.
     * @throws Will throw an error if the lengths of the colors and nodes arrays do not match.
     */
    applyColors(color: (ColorHandle | undefined)[], nodes: number[]): void;
    /**
     * Clears the color from the given nodes.
     * @param nodes - The nodes to clear the color from.
     */
    clearColor(nodes: number[] | 'all'): void;
    private updateMap;
    private scheduleNodeStateChange;
    private scheduleUpdate;
    private update;
    private callRPCForState;
}
export {};
