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