import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{Source as r,Layer as l}from"@vis.gl/react-mapbox";import{MapConfig as o,ClusterConfig as c}from"../../../../constants.js";import{getStatusColor as s}from"../../../../utils/getStatusColor.js";var a=function(e,t){return{type:"FeatureCollection",features:e&&!e.isSubjectWell?[{type:"Feature",geometry:{type:"Point",coordinates:[e.coords.longitude,e.coords.latitude]},properties:{color:s({status:e.well.status,mapStyle:t,state:"hovered",isSubjectWell:!1}).fill,isOffsetWell:e.isOffsetWell}}]:[]}},d=function(s){var d=s.highlightGeoJSON,g=s.activeHighlightGeoJSON,n=s.isActiveWellIsSubjectWell,u=s.hoveredWell,h=s.mapStyle;return e(t,{children:[d.features.length>0&&i(r,{id:o.SourceIds.WellHighlights,type:"geojson",data:d,children:i(l,{id:o.LayerIds.WellHighlights,type:"circle",beforeId:o.LayerIds.WellsUnclustered,minzoom:c.unclusteredMinZoom,paint:{"circle-radius":o.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":.16}})}),g&&!n&&i(r,{id:o.SourceIds.ActiveHighlight,type:"geojson",data:g,children:i(l,{id:o.LayerIds.ActiveHighlight,type:"circle",beforeId:o.LayerIds.WellsUnclustered,minzoom:c.unclusteredMinZoom,paint:{"circle-radius":o.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})}),i(r,{id:o.SourceIds.HoverHighlight,type:"geojson",data:a(u,h),children:i(l,{id:o.LayerIds.HoverHighlight,type:"circle",beforeId:o.LayerIds.WellsUnclustered,paint:{"circle-radius":o.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})})]})};export{d as WellHighlightLayers};
//# sourceMappingURL=WellHighlightLayers.js.map
