///
import type { ShallowRef } from "vue-demi";
import type { SafeAmap } from "../components/Amap/SafeAmap";
export type Language = "en" | "zh" | "zh-TW";
export type CoordinateType = "wgs84" | "gcj02" | "bd09";
export type Point = [number, number];
export type LngLatLiterial = {
lng: number;
lat: number;
};
export type CoordinatePoint = {
lng: number;
lat: number;
type: CoordinateType;
};
export type AmapMap = SafeAmap;
export type MapShallowRef = ShallowRef;
export type Place = {
lng: number;
lat: number;
name: string;
displayName: string;
pointSource?: PointSource;
};
export interface CoordinatePlace extends Place {
type: CoordinateType;
}
export interface Zone {
name: string;
path: Point[];
}
export interface CoordinateZone extends Omit {
path: CoordinatePoint[];
}
export interface RecommendZonePlaces {
adsorption?: boolean;
type?: RecommendType;
available?: boolean;
zone?: Zone;
places?: Place[];
}
export interface CoordinateRecommendZonePlaces extends Omit {
zone?: CoordinateZone;
places?: CoordinatePlace[];
}
export interface ValueOfOnChangeRecommendPlace {
type: RecommendType;
place: Place | CoordinatePlace;
inputPlace: Place;
zone?: Zone;
isSameZone: boolean;
noAnimation?: boolean;
}
export interface CoordinateValueOfOnChangeRecommendPlace extends Omit {
place: CoordinatePlace;
inputPlace: CoordinatePlace;
zone?: CoordinateZone;
}
export interface GeoPosition {
position: Point;
coords?: GeolocationCoordinates;
}
export interface CoordinateGeoPosition extends Omit {
position: CoordinatePoint;
}
export interface RegisterOverlay {
add: (overlay: T) => void;
remove: (overlay: T) => void;
setFitView: (immediate?: boolean) => void;
}
export interface RouteStep {
path: Point[];
duration: number;
distance: number;
}
export interface Route {
path: Point[];
distance: number;
duration: number;
tolls?: number;
steps: RouteStep[];
trafficJams?: TrafficJams;
isCrossBorder?: boolean;
}
export interface ExternalRoute {
path: Point[];
duration: number;
distance: number;
}
export interface TrackPoint {
lng: number;
lat: number;
angle?: number;
speed?: number;
timestamp: number;
}
export interface CoordinateTrackPoint extends TrackPoint {
type: CoordinateType;
}
export interface CoordinateExternalRoute extends Omit {
path: CoordinatePoint[];
}
export type GetDriverRouteOrTrackOutput = {
routes?: CoordinateExternalRoute;
tracks?: CoordinateTrackPoint[];
} | undefined;
export type RecommendType = "Restricted" | "Forbidden" | "Recommend";
export type DriverStatus = "dispatching" | "book-dispatching" | "dispatched" | "driverStartService" | "driverStartRelayService" | "book-driverStartService" | "book-dispatched" | "driverArrived" | "inService" | "canceled" | "endService" | "completed" | "canceling" | "banlanceRefund" | "waitBanlanceRefund" | "rechargePayed" | "waitRechargePay" | "payed" | "waitpay" | "refund" | "confirmed" | "assign" | "orderReassigned";
export declare enum CenterPlaceStatus {
GEO_LOADING = "GEO_LOADING",
QUERYING_INFO = "QUERYING_INFO",
SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE",
OK = "OK"
}
export declare enum PointSource {
GOOGLE = "go",
GAODE = "am",
HKGOV = "gov",
RECOMMEND = "recommend",
OTHERS = "others"
}
export type ConnectionStatus = "pending" | "connected" | "unconnected";
export interface BusinessGeolocationPositionError extends GeolocationPositionError {
isBusinessTimeout: boolean;
}
export type ProxyServiceError = {
code: number;
msg: string;
};
export type TrafficStatus = "UNKNOWN" | "NORMAL" | "SLOW" | "TRAFFIC_JAM" | "HEAVY_TRAFFIC_JAM";
export type TrafficJams = Record<`${number},${number}`, {
before: TrafficStatus;
after: TrafficStatus;
}>;
export type MapThemeVariables = {
TRAFFIC_UNKNOWN_BACKGROUND_COLOR?: string;
TRAFFIC_UNKNOWN_BORDER_COLOR?: string;
TRAFFIC_NORMAL_BACKGROUND_COLOR?: string;
TRAFFIC_NORMAL_BORDER_COLOR?: string;
TRAFFIC_SLOW_BACKGROUND_COLOR?: string;
TRAFFIC_SLOW_BORDER_COLOR?: string;
TRAFFIC_TRAFFIC_JAM_BACKGROUND_COLOR?: string;
TRAFFIC_TRAFFIC_JAM_BORDER_COLOR?: string;
TRAFFIC_HEAVY_TRAFFIC_JAM_BACKGROUND_COLOR?: string;
TRAFFIC_HEAVY_TRAFFIC_JAM_BORDER_COLOR?: string;
TRAFFIC_DONE_BACKGROUND_COLOR?: string;
TRAFFIC_DONE_BORDER_COLOR?: string;
WALKING_LINE_COLOR?: string;
ZONE_RESTRICTED_BACKGROUND_COLOR?: string;
ZONE_RESTRICTED_BORDER_COLOR?: string;
ZONE_FORBIDDEN_BACKGROUND_COLOR?: string;
ZONE_FORBIDDEN_BORDER_COLOR?: string;
ICON_START_POINT_EN_URL?: string;
ICON_END_POINT_EN_URL?: string;
ICON_END_POINT_ZH_TW_URL?: string;
ICON_TAXI_CAR_URL?: string;
ICON_DOT_LOADING_URL?: string;
ICON_LOAD_FAILED_URL?: string;
ICON_WAYPOINT_URL?: string;
};