/**
 * @version 2.29.0
 * 为什么重构？
 * 1. 点击事件没有考虑Five模型
 * 2. 为了在 mouseDown 的时候阻止 five tap 事件，需要提前做碰撞检测，但其实是没必要的，因为触发了 mouseDown 也不一定触发 点击事件 或者 Tap 事件，因为可能物体不可见或者有什么其他的判断
 * 3. 基于第二点，废弃了之前使用浏览器原生事件监听点击的方式，改为使用 wantsTapGesture 的方式
 * 4. 重构之后只会在 wantsTapGesture 事件触发的时候做射线检测
 */
import type { Five } from '@realsee/five';
import * as THREE from 'three';
interface EventMap {
    /**
     * @description 点击事件
     * @return {PreventFiveEvent} 返回 false 可以不阻止 five 的 tap 事件; default: true
     */
    click: (event: CallbackEvent) => PreventFiveEvent | void;
    /**
     * @description 鼠标移入事件
     */
    hover: (event: CallbackEvent) => void;
    /**
     * @description 鼠标移出事件
     */
    unHover: (event: CallbackEvent) => void;
}
type EventName = keyof EventMap;
type PreventFiveEvent = boolean;
interface EventHandlerConfig {
    /**
     * @default true
     */
    checkVisible?: boolean;
}
interface CallbackEvent {
    type: EventName;
    target: THREE.Object3D;
    origDomEvent?: Event;
    intersect: THREE.Raycaster;
    stopPropagation: () => void;
}
type Object3DWithEvent = THREE.Object3D & {
    _domEvent?: {
        [key in `${EventName}Handler`]?: Array<[EventMap[EventName], EventHandlerConfig]>;
    };
    _hovered?: boolean;
};
export declare class FiveDomEvents {
    private five;
    private boundObject;
    constructor(five: Five);
    /**
     * @description: added 时自动绑定事件，removed时自动解绑事件，也就是说只有物体在场景中的时候才会触发事件
     * @note: 注意：目前需要触发物体的 added 事件和 removed 事件才会生效
     * @todo: added 和 removed 还是不太智能
     */
    addAutoBindEventListener<T extends EventName>(object: Object3DWithEvent, event: T, callback: EventMap[T], config?: EventHandlerConfig): () => void;
    /**
     * @description: add event listener
     * @param params.object: object
     * @param params.event: event name
     * @param params.callback: 返回 false 可以不阻止 five 的 tap 事件; default: true
     * @return {void}
     */
    addEventListener<T extends EventName>(object: Object3DWithEvent, event: T, callback: EventMap[T], config?: EventHandlerConfig): void;
    removeEventListener(object: Object3DWithEvent, event: EventName, callback: (e: CallbackEvent) => any, ...args: any[]): void;
    dispose(): void;
    private getRaycaster;
    private handleWantsGesture;
    private onDomEvent;
    private objectIsBound;
    private notify;
}
export {};
