import { BaseMetaNode } from '../../layout/types';
import { Doc } from '../../view/Doc';
import { CursorIntent, Side } from '../types/cursor';
export interface HitResult {
    id: string;
    offset: number;
    side: Side;
    path: string[];
    pathIndex: number[];
    pageId: string;
    preId: string;
    isPlaceholder: boolean;
}
export type HitIntent = {
    type: 'cursor';
} | {
    type: 'selection';
    anchorId: string;
    focusId: string;
};
export type HitIntentResult = {
    type: 'cursor';
    hit: HitResult;
} | {
    type: 'selection';
    anchor: HitResult;
    focus: HitResult;
} | null;
export interface HitHandler {
    /** 视觉命中 -> HitResult */
    handleHitDetection(doc: Doc, node: BaseMetaNode, actualX: number, actualY: number): HitResult | null;
    /** 逻辑命中 -> HitResult */
    resolveCursorIntent?: (doc: Doc, node: BaseMetaNode, intent: CursorIntent) => HitResult | null;
    /** 是否点中即全选 */
    isClickSelectAll?: (doc: Doc, node: BaseMetaNode) => HitIntent;
}
