import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components-preview/charts";
import { defineBearing } from "./define-bearing.js";
import { calculateHoveredColor } from "../../../functions/calculate-hovered-color.js";
import { defineColor } from "../../../functions/define-color.js";
const parseDotDataToGeoJSON = (data, color, bearing) => {
  return {
    type: "FeatureCollection",
    features: data.map((feature) => {
      const { longitude, latitude, ...properties } = feature;
      const canvasColor = getCanvasColor(defineColor(color, feature));
      const hoveredColor = calculateHoveredColor(canvasColor);
      return {
        type: "Feature",
        properties: {
          data: feature,
          ...properties,
          __color: canvasColor,
          __hoveredColor: hoveredColor,
          __bearing: defineBearing(bearing, feature)
        },
        geometry: { type: "Point", coordinates: [longitude, latitude] }
      };
    })
  };
};
export {
  parseDotDataToGeoJSON
};
//# sourceMappingURL=parse-dot-data-to-geo-json.js.map
