import { ISignal } from "ste-signals";
import { IVimElement, IVim } from "./vim";
import { THREE } from "../..";
export interface ISelectionAdapter<T extends IVimElement> {
    outline(target: T, state: boolean): void;
}
/**
 * Selection manager that supports adding, removing, toggling, and querying selected objects.
 * The selection change signal is debounced to dispatch only once per animation frame.
 */
export declare class Selection<T extends IVimElement> {
    private _onSelectionChanged;
    private _selection;
    private _adapter;
    /**
     * If true, reselecting the currently selected single target will toggle it instead of doing nothing.
     */
    toggleOnRepeatSelect: boolean;
    /**
     * If true, the selection manager is enabled and can modify the selection.
     */
    enabled: boolean;
    /**
     * Creates a new Selection manager.
     * @param adapter - Adapter responsible for visual selection feedback.
     */
    constructor(adapter: ISelectionAdapter<T>);
    /**
     * Checks whether a specific object is currently selected.
     * @param target - The target to check.
     * @returns `true` if the object is selected; otherwise, `false`.
     */
    has(target: T): boolean;
    /**
     * Returns the number of selected objects.
     * @returns The count of selected items.
     */
    count(): number;
    /**
     * Checks if there is at least one selected object.
     * @returns `true` if the selection is not empty.
     */
    any(): boolean;
    /**
     * Signal that fires when the selection changes.
     */
    get onSelectionChanged(): ISignal;
    /**
     * Normalizes a value to an array of objects.
     * @param oneOrMore - A single object or an array of objects.
     * @returns An array of objects.
     */
    private toArray;
    /**
     * Replaces the current selection with the given object(s).
     * If `toggleOnRepeatSelect` is true and the object is already the only selected one, it toggles it instead.
     * @param objectOrObjects - Object(s) to select, or `undefined` to clear the selection.
     */
    select(object: T): void;
    select(objects: T[]): void;
    /**
     * Toggles the selection state of the given object(s).
     * @param objectOrObjects - Object(s) to toggle.
     */
    toggle(object: T): void;
    toggle(objects: T[]): void;
    /**
     * Adds the given object(s) to the selection.
     * @param objectOrObjects - Object(s) to add.
     */
    add(object: T): void;
    add(objects: T[]): void;
    /**
     * Removes the given object(s) from the selection.
     * @param objectOrObjects - Object(s) to remove.
     */
    remove(object: T): void;
    remove(objects: T[]): void;
    /**
     * Clears the entire selection.
     */
    clear(): void;
    /**
     * Returns an array of all currently selected objects.
     * @returns An array of selected objects.
     */
    getAll(): T[];
    /**
     * Returns all selected objects belonging to a specific VIM model.
     * @param vim - The VIM instance to filter by.
     * @returns An array of selected objects from the specified VIM.
     */
    getFromVim(vim: IVim<T>): T[];
    /**
     * Removes all selected objects that belong to a specific VIM model.
     * @param vim - The VIM instance to remove selections from.
     */
    removeFromVim(vim: IVim<T>): void;
    /**
     * Computes the bounding box that contains all selected objects.
     * Skips objects that do not implement `getBoundingBox()`.
     * @returns A promise resolving to the combined bounding box.
     */
    getBoundingBox(): Promise<THREE.Box3 | undefined>;
}
