
/* 
TODO 修改完成
*/

import * as L from "leaflet";
import Shared from '../../DeviceIcon/shared';

/**根据设备类型和状态获取设备展示图标 */
export const getDeviceIcon = (type, status) => {
  return Shared.getCameraTypeIcon(type, status);
};

export const getDeviceIconColor = (type, status) => {
  return Shared.getCameraIconColor(type, status);
};

export const drawOptions = {
  fill: true,
  fillColor: "var(--primary)",
  fillOpacity: 0.1,
  color: "var(--primary)",
  weight: 2
};

export const tipOptions = {
  closeButton: false,
  direction: "top",
  className: "marker-popup-layout arrow-map-layout",
  offset: L.point(0, -30)
};

export const popupOptions = {
  closeButton: false,
  autoClose: false,
  closeOnClick: false,
  className: "marker-popup-layout",
  offset: L.point(0, -10),
  openPopup:true,
  zoomAnimation:true
};

export const byTypeOptions = {
  closeButton: false,
  autoClose: false,
  closeOnClick: false,
  className: "marker-popup-layout",
  offset: L.point(20, -10),
  openPopup:true,
  zoomAnimation:true
};

export const imagePopupOptions = {
  offset: L.point(0, -10),
  closeButton: false,
  // openPopup:true,
  closeOnClick: false,
  zoomAnimation:true,
  className: "marker-popup-image",
};

export const clusterOptions = {
  showCoverageOnHover: false,
  maxClusterRadius: 80,
  spiderfyOnMaxZoom: false,
  removeOutsideVisibleBounds: true,
  chunkedLoading: true,
  zoomToBoundsOnClick: false
};

export const polygonOptions = {
  stroke: true,
  weight: 2,
  color: "#2299FF",
  fill: true,
  fillColor: "#44AAFF",
  fillOpacity: 0.1
};


