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