import * as _THREE from 'three';
import { Group } from 'three';
import { Map, Service } from '@ktmap/map';
import { AStar } from '@ktmap/shared';
import { InfoWindow } from '@ktmap/plugin-info-window';

interface Options$1 {
    BASE_URL: string;
    data: any[] | (() => Promise<any[]>);
    /**
     * 进口位置
     */
    entry: _THREE.Vector3;
    /**
     * 出口位置
     */
    exit: _THREE.Vector3;
    speed?: number;
}
/**
 * demo 行为
 */
declare enum DemoAction {
    In = 0,
    Out = 1,
    Jam = 2
}

interface Options {
    car: Group;
    aStar: AStar;
    speed?: number;
}
declare enum CarAction {
    Empty = 0,
    EnterActive = 1,
    Enter = 2,
    LeaveActive = 3,
    Leave = 4,
    Jam = 5,
    Violation = 6
}
interface CarQueueItem {
    carNo: string;
    parkNo: number;
    parkObject: _THREE.Object3D;
    car: Car;
}
/**
 * 车子类
 */
declare class Car {
    private map;
    private options;
    static carQueue: Array<CarQueueItem>;
    /**
     * 获取车模型
     */
    static loadCarModal(BASE_URL: string): Promise<_THREE.Group>;
    private stopID;
    private tweenGroupCar;
    carAction: CarAction;
    car: _THREE.Group;
    constructor(map: Map, options: Options);
    private init;
    /**
     * 进场
     */
    in({ begin, end, parkObject, violation }: {
        begin: _THREE.Vector3;
        end: _THREE.Vector3;
        parkObject: _THREE.Object3D;
        violation?: boolean;
    }): Promise<void>;
    /**
     * 离场
     * 如果当前车子还没有停好，不能离场行为，给出提示
     */
    out({ begin, end, jam }: {
        begin: _THREE.Vector3;
        end: _THREE.Vector3;
        jam?: boolean;
    }): Promise<void>;
    /**
     * 准备，开始规划一条路线
     */
    private runPrepare;
    /**
     * 模拟车子行驶到到指定终点车位泊车
     */
    private run;
    /**
     * 销毁
     */
    private dispose;
    /**
     * 绘制普通辅助线段
     */
    private drawNormalLine;
}

/**
 * experimental 沙盘
 */
declare class SandTable extends Service<{
    complete: void;
    jam: {
        carQueue: CarQueueItem[];
        infoWindow: InfoWindow;
    };
    carHover: {
        car: _THREE.Object3D;
        infoWindow: InfoWindow;
    };
    parkClick: {
        park: _THREE.Object3D;
        infoWindow: InfoWindow;
    };
    violation: {
        car: _THREE.Object3D;
        infoWindow: InfoWindow;
    };
}> {
    private map;
    private options;
    static NAME: string;
    /**
     * TODO: 完善参考 Vue onMounted 的设计
     */
    private complateHook;
    private carModal;
    private aStar;
    private infoWindowJam;
    private infoWindowViolation;
    constructor(map: Map, options: Options$1);
    __init(): Promise<void>;
    /**
     * 沙盘 demo
     */
    demo(action: DemoAction, ext?: any): Promise<void>;
    /**
     * TODO:待优化提取
     */
    initData(cb?: (...args: any[]) => void): Promise<void>;
    /**
     * 根据车位编号id获取车位元素
     */
    private getParkObjectById;
}

declare module '@ktmap/map' {
    interface KTMap {
        SandTable: typeof SandTable;
    }
}

export { Car, CarAction, CarQueueItem, DemoAction, Options$1 as Options, SandTable };
