"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("@vis.gl/react-mapbox"),r=require("@turf/circle"),i=require("../../utils/polygonCoords.js"),n=require("../../constants.js"),s=require("./constants.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(r),u=function(r){var l=r.zone,u=r.mapStyle,c=t.useMemo((function(){return"radius"===l.type?a.default([l.center.longitude,l.center.latitude],l.radius,{units:"miles",steps:64}):i.createPolygonGeoJSON(l.polygonCoords)}),[l]),d=s.GhostStyles[u];return c?e.jsx(o.Source,{id:n.MapConfig.SourceIds.GhostZone,type:"geojson",data:c,children:e.jsx(o.Layer,{id:n.MapConfig.LayerIds.GhostZoneFill,type:"fill",beforeId:n.MapConfig.LayerIds.LoadingTilesFill,paint:{"fill-color":d.fill,"fill-opacity":1}})}):null};u.displayName="GhostSelectionZone",exports.GhostSelectionZone=u;
//# sourceMappingURL=GhostSelectionZone.js.map
