import * as THREE from 'three';
export interface RaycastHit {
    /** Intersected object */
    object: THREE.Object3D;
    /** Intersection point */
    point: THREE.Vector3;
    /** Distance from camera */
    distance: number;
    /** UV coordinates (if available) */
    uv?: THREE.Vector2;
    /** Face normal */
    face?: THREE.Face;
    /** Face index */
    faceIndex?: number;
    /** Instance ID (for instanced meshes) */
    instanceId?: number;
}
export interface GridHit {
    /** Grid X coordinate */
    gridX: number;
    /** Grid Z coordinate */
    gridZ: number;
    /** World position */
    worldPosition: THREE.Vector3;
    /** Intersected object type */
    objectType?: 'tile' | 'unit' | 'feature';
    /** Object ID if available */
    objectId?: string;
}
export interface UseRaycasterOptions {
    /** Camera reference */
    camera: THREE.Camera | null;
    /** Canvas element for coordinate conversion */
    canvas: HTMLCanvasElement | null;
    /** Grid cell size */
    cellSize?: number;
    /** Grid offset X */
    offsetX?: number;
    /** Grid offset Z */
    offsetZ?: number;
}
export interface UseRaycasterReturn {
    /** Raycaster instance */
    raycaster: React.MutableRefObject<THREE.Raycaster>;
    /** Mouse vector instance */
    mouse: React.MutableRefObject<THREE.Vector2>;
    /** Get intersection at client coordinates */
    getIntersection: (clientX: number, clientY: number, objects: THREE.Object3D[]) => RaycastHit | null;
    /** Get all intersections at client coordinates */
    getAllIntersections: (clientX: number, clientY: number, objects: THREE.Object3D[]) => RaycastHit[];
    /** Get grid coordinates at client position */
    getGridCoordinates: (clientX: number, clientY: number) => {
        x: number;
        z: number;
    } | null;
    /** Get tile at client position from scene */
    getTileAtPosition: (clientX: number, clientY: number, scene: THREE.Scene) => GridHit | null;
    /** Convert client coordinates to normalized device coordinates */
    clientToNDC: (clientX: number, clientY: number) => {
        x: number;
        y: number;
    };
    /** Check if point is within canvas bounds */
    isWithinCanvas: (clientX: number, clientY: number) => boolean;
}
/**
 * Hook for 3D raycasting operations
 *
 * @example
 * ```tsx
 * const { getIntersection, getGridCoordinates } = useRaycaster({
 *     camera,
 *     canvas: canvasRef.current
 * });
 *
 * const handleClick = (e: MouseEvent) => {
 *     const hit = getIntersection(e.clientX, e.clientY, tileMeshes);
 *     if (hit) {
 *         const grid = getGridCoordinates(e.clientX, e.clientY);
 *         console.log('Clicked grid:', grid);
 *     }
 * };
 * ```
 */
export declare function useRaycaster(options: UseRaycasterOptions): UseRaycasterReturn;
export default useRaycaster;
