import{jsx as o}from"react/jsx-runtime";import{useMemo as t}from"react";import{Source as r,Layer as e}from"@vis.gl/react-mapbox";import i from"@turf/circle";import{createPolygonGeoJSON as l}from"../../utils/polygonCoords.js";import{MapConfig as n}from"../../constants.js";import{GhostStyles as s}from"./constants.js";var a=function(a){var m=a.zone,p=a.mapStyle,c=t((function(){return"radius"===m.type?i([m.center.longitude,m.center.latitude],m.radius,{units:"miles",steps:64}):l(m.polygonCoords)}),[m]),d=s[p];return c?o(r,{id:n.SourceIds.GhostZone,type:"geojson",data:c,children:o(e,{id:n.LayerIds.GhostZoneFill,type:"fill",beforeId:n.LayerIds.LoadingTilesFill,paint:{"fill-color":d.fill,"fill-opacity":1}})}):null};a.displayName="GhostSelectionZone";export{a as GhostSelectionZone};
//# sourceMappingURL=GhostSelectionZone.js.map
