import {uuid} from "@/utils";

export const Circle = ({radius, coordinates, symbol = []}) => {
  const uuidstr = uuid();
  const [
    line = {
      lineColor: "#FF0000",
      lineWidth: 3,
      polygonOpacity: 0.4,
      polygonFill: "#DCE372"
    },
    text = {
      // textName: "geom2",
      // textFill: "#FF0000",
      // textSize: 20
    }
  ] = symbol;
  return {
    name: uuidstr,
    geojson: {
      feature: {
        type: "Feature",
        geometry: {"type": "Polygon"},
        id: uuidstr,
        properties: {"name": "geom2"}
      },
      subType: "Circle",
      coordinates: coordinates,
      radius: radius,
      options: {},
      symbol: [
        line,
        text
      ]
    }
  }
}
