import{toCoordinates as t}from"../../utils/toCoordinates.js";import{toMapboxCoords as e}from"../../utils/toMapboxCoords.js";import{getStatusColor as o}from"../../utils/getStatusColor.js";import{mapbox as s}from"../../../../../../../utils/index.js";var i=s.isValidCoordinates,l=function(t,e,o){var s=[],i=[];return t.forEach((function(t){t.id!==e&&(t.id&&o.has(t.id)?s.push(t):i.push(t))})),{offsetWells:s,unSelectedWells:i}},r=function(s,l,r,a,u){var n,d=null==s||null===(n=s.topHole)||void 0===n?void 0:n.coordinates;if(!d||!i(d))return null;var p=t(d),f=(null==l?void 0:l.id)===s.id,c=!!s.id&&(r.has(s.id)&&!f),m=c?"selected":"default",h=o({status:s.status,mapStyle:a,state:m,isSubjectWell:f});return{type:"Feature",geometry:{type:"Point",coordinates:e(p)},properties:{id:s.id||0,name:s.name||"",status:s.status||"unknown",totalDepth:s.totalDepth,rigReleaseDate:s.rigReleaseDate,isOffsetWell:c,isSubjectWell:f,isSelected:c?1:0,color:h.fill,strokeColor:u&&h.stroke?h.stroke:null,strokeWidth:u?1:0}}};export{r as createWellFeature,l as partitionWells};
//# sourceMappingURL=well-markers-utils.js.map
