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