"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("react"),r=require("./utils/well-markers-utils.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e);exports.useWellMarkers=function(e){var l=e.wells,n=e.offsetWellIds,i=e.activeWellId,o=e.subjectWell,s=e.mapStyle,a="satellite"===s,f=t.useMemo((function(){return new Set(n)}),[n]),c=t.useMemo((function(){var e=r.partitionWells(l,null==o?void 0:o.id,f),t=e.offsetWells,n=e.unSelectedWells,i=[].concat(u.default(n),u.default(t)),c=[];return i.forEach((function(e){var t=r.createWellFeature(e,o,f,s,a);t&&c.push(t)})),{type:"FeatureCollection",features:c}}),[l,f,o,s,a]),d=t.useMemo((function(){return{type:"FeatureCollection",features:c.features.filter((function(e){return e.properties.isOffsetWell}))}}),[c]),p=t.useMemo((function(){if(!i||i===(null==o?void 0:o.id))return null;var e=c.features.find((function(e){return e.properties.id===i}));return e?{type:"FeatureCollection",features:[e]}:null}),[c,i,null==o?void 0:o.id]);return{wellsGeoJSON:c,highlightGeoJSON:d,activeHighlightGeoJSON:p}};
//# sourceMappingURL=useWellMarkers.js.map
