/**
 * @module viw-webgl-viewer/gizmos/sectionBox
 */
import { Viewer } from '../../viewer';
import * as THREE from 'three';
import { SectionBoxHandles } from './sectionBoxHandles';
/**
 * Manages pointer interactions (mouse, touch, etc.) on a {@link SectionBoxHandles} to
 * reshape a Three.js `Box3`. This includes detecting which handle is hovered or dragged,
 * capturing the pointer for smooth dragging, and enforcing a minimum box size.
 */
export declare class BoxInputs {
    /** The parent Viewer controlling the scene. */
    private _viewer;
    /** The handles mesh group containing the draggable cones/faces. */
    private _handles;
    /** The main box that is being reshaped by dragging handles. */
    private _sharedBox;
    /** The currently hovered/dragged handle, if any. */
    private _handle;
    /** The origin point for dragging, updated on pointer down. */
    private _dragOrigin;
    /** The plane used for drag intersection (perpendicular to the camera direction). */
    private _dragPlane;
    /** Whether a pointer is currently down on a handle. */
    private _mouseDown;
    /** A reusable Raycaster for picking and plane intersection. */
    private _raycaster;
    /** The box state before the current drag. */
    private _lastBox;
    /** A callback to restore the original input listeners after unregistering. */
    private _restoreOriginalInputs;
    /**
     * Called when the pointer enters or leaves a handle face.
     * @param normal - The normal (forward) vector of the hovered handle, or a zero vector if none.
     */
    onFaceEnter: ((normal: THREE.Vector3) => void) | undefined;
    /**
     * Called continuously as the box is reshaped by dragging.
     * @param box - The updated box after the latest drag move.
     */
    onBoxStretch: ((box: THREE.Box3) => void) | undefined;
    /**
     * Called when the user has finished reshaping the box (pointer up).
     * @param box - The final box after dragging ends.
     */
    onBoxConfirm: ((box: THREE.Box3) => void) | undefined;
    /**
     * Creates a new BoxInputs instance for pointer-driven box resizing.
     *
     * @param viewer - The parent {@link Viewer} that renders the scene.
     * @param handles - A {@link SectionBoxHandles} instance containing the draggable mesh handles.
     * @param box - The shared bounding box (`Box3`) that will be updated by dragging.
     */
    constructor(viewer: Viewer, handles: SectionBoxHandles, box: THREE.Box3);
    /**
     * Registers pointer event listeners on the viewer's canvas.
     * If already registered, it does nothing.
     */
    register(): void;
    /**
     * Unregisters any previously set pointer event listeners, releasing pointer capture
     * and resetting drag state.
     */
    unregister(): void;
    /**
     * Handles pointer movement events.
     * - If dragging, calls {@link onDrag}.
     * - Otherwise, performs a raycast to detect which handle is under the pointer.
     *
     * @param event - The pointermove event.
     */
    private onMouseMove;
    /**
     * Handles pointer up events. Ends dragging and triggers {@link onBoxConfirm}.
     *
     * @param event - The pointerup event.
     */
    private onMouseUp;
    /**
     * Handles pointer down events. Begins drag if a handle is hit, capturing the pointer.
     *
     * @param event - The pointerdown event.
     */
    private onMouseDown;
    /**
     * Continues the drag operation. Determines the new position on the drag plane
     * and computes how far we moved along the handle's forward axis.
     *
     * @param event - The pointermove event while dragging.
     */
    private onDrag;
    /**
     * Expands or contracts the `_sharedBox` along one axis by a certain amount,
     * ensuring the box cannot shrink below the minimum size (`MIN_BOX_SIZE`).
     *
     * @param axis - The axis ('x', 'y', or 'z') to stretch.
     * @param sign - +1 if stretching the 'max' side, -1 if stretching the 'min' side.
     * @param amount - The numeric offset along that axis to add or subtract.
     * @returns A **new** `Box3` instance with updated min/max coordinates.
     */
    private stretch;
    /**
     * Raycasts into the handle meshes from the given pointer position.
     *
     * @param position - The pointer position in canvas coordinates.
     * @returns An array of intersection results, if any.
     */
    private raycast;
    /**
     * Raycasts into the drag plane from the given pointer position.
     *
     * @param position - The pointer position in canvas coordinates.
     * @returns The intersection point in 3D space, or `null` if none.
     */
    private raycastPlane;
    private setupRaycaster;
}
