/// <reference types="react" />
import { ThreeEvent, ReactThreeFiber } from '@react-three/fiber';
import { IStructureObject, ObjectID, PluginID } from '@buerli.io/core';
import { CCClasses } from '@buerli.io/classcad';
import { InfinityPlane } from '../../components/graphics/InfinityPlane';
import { Geometry } from 'three-stdlib';
export declare const UNDEFINEDID = -1;
export declare type HighlightedConstraintsT = Array<{
    constraintId: ObjectID;
    geometryId: ObjectID;
}>;
export declare type SketchPState = {
    alwaysShowConstr: boolean;
    constraintsToGeometry: {
        [key: number]: ObjectID;
    };
    showRigidSets: boolean;
    activeHandler: HandlersList | undefined;
    handlers: {
        [key: string]: Handler;
    };
    tmpObjects: {
        [key: string]: TmpObject;
    };
    selected: ObjectID[];
    hovered: ObjectID;
    highlighted: ObjectID[];
    scale: number;
    step: number;
    dimPluginId: PluginID | undefined;
    mousePos: THREE.Vector3 | undefined;
    drawnObjectsRef: React.MutableRefObject<THREE.Group> | undefined;
    rubberBandRectangle: {
        min: THREE.Vector2;
        max: THREE.Vector2;
    } | undefined;
};
export declare type TmpObjectID = string;
export declare enum HandlersList {
    CREATEANGLE = "createAngle",
    DRAG = "drag",
    DRAWPOINT = "drawPoint",
    DRAWLINE = "drawLine",
    DRAWRECTANGLE = "drawRectangle",
    DRAWARCTANGENT = "drawArcTangent",
    DRAWARCCENTER = "drawArcCenter",
    DRAWARCMIDDLE = "drawArcMidlde",
    DRAWCIRCLE = "drawCircle",
    FILLET = "fillet",
    HOVER = "hover",
    TRIM = "trim",
    GSELECTION = "globalSelection"
}
export declare type PointerEventsT = {
    target: any;
    pointerId: any;
};
export declare type Handler = {
    name: HandlersList;
    filter: (object: IStructureObject) => boolean;
    onConstruct?: () => void;
    onDestruct?: () => void;
    isSelector?: boolean;
    escHandler?: () => void;
    pointerHandlers: {
        [key: string]: (e: ThreeEvent<PointerEvent> & PointerEventsT) => void;
    };
    keyHandlers?: {
        [key: string]: (e: KeyboardEvent) => boolean | void;
    };
};
declare type TmpObjectCommon = {
    class: CCClasses;
    id: string;
};
export declare type TmpLineT = TmpObjectCommon & {
    startPId: TmpObjectID;
    endPId: TmpObjectID;
};
export declare type TmpPointT = TmpObjectCommon & {
    position: THREE.Vector3;
};
export declare type TmpArcT = TmpObjectCommon & {
    startPId: TmpObjectID;
    endPId: TmpObjectID;
    centerPId: TmpObjectID;
    clockwise: boolean;
    drawAsLine?: boolean;
};
export declare type TmpCircleT = TmpObjectCommon & {
    centerPId: TmpObjectID;
    radius: number;
};
export declare type TmpAngularDimensionT = TmpObjectCommon & {
    dir0: THREE.Vector3;
    dir1: THREE.Vector3;
    center: THREE.Vector3;
    dimPos: THREE.Vector3;
    reflex: number;
};
export declare type TmpObject = TmpLineT | TmpPointT | TmpArcT | TmpCircleT | TmpAngularDimensionT;
export declare type TmpObjects = {
    [key: string]: TmpObject;
};
declare global {
    type InfinityPlaneT = ReactThreeFiber.Object3DNode<InfinityPlane, typeof InfinityPlane>;
    namespace JSX {
        interface IntrinsicElements {
            infinityPlane: InfinityPlaneT;
            geometry: ReactThreeFiber.Node<Geometry, typeof Geometry>;
        }
    }
}
export {};
