import{memo as e,useMemo as r,useCallback as o}from"react";import t from"prop-types";import l from"classnames";import s from"./popupGenerator.js";import i from"./Map.js";import n from"./index.css.js";import{jsx as u}from"react/jsx-runtime";function a(e){var t=e.subjectWell,a=e.wells,f=e.offsetWells,p=e.radius,d=e.mapHidden,m=e.onSetSubjectWell,c=e.onRemoveSubjectWell,W=e.onAddOffsetWell,j=e.onDeleteOffsetWell,b=r((function(){return f.map((function(e){return e.id}))}),[f]),R=o((function(e,r){r?j(e):W(e)}),[W,j]),q=o((function(e,r){r?c(e):m(e)}),[m,c]),O=l(n.mapContainer,d&&n.mapContainerHidden);return u("div",{className:O,children:u(i,{subjectWell:t,wells:a,offsetWells:f,radius:p,popUpFormatter:s(t,b,q,R),coordsDataPath:"topHole.coordinates"})})}a.propTypes={subjectWell:t.shape({}),wells:t.arrayOf(t.shape({})).isRequired,offsetWells:t.arrayOf(t.shape({})).isRequired,radius:t.number,mapHidden:t.bool.isRequired,onSetSubjectWell:t.func.isRequired,onRemoveSubjectWell:t.func.isRequired,onAddOffsetWell:t.func.isRequired,onDeleteOffsetWell:t.func.isRequired},a.defaultProps={subjectWell:null,radius:null};var f=e(a);export{f as default};
