"use strict";var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),l=require("prop-types"),s=require("@material-ui/core"),t=require("./FormationsLegend.js"),o=require("./popupGenerator.js"),a=require("./utils.js"),i=require("./Map.js"),u=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=d(e),f=d(l),p=s.makeStyles({mapContainerHidden:{marginTop:"20px",display:"none"}});function m(e){var l=e.open,s=e.subjectWell,d=e.wells,f=e.offsetWells,m=e.radius,c=e.mapHidden,q=e.isMobile,b=e.onAddOffsetWell,j=e.onDeleteOffsetWell,W=p(),y=r.useMemo((function(){return a.getAllFormations(d)}),[d]),O=n.default(y,2),R=O[0],h=O[1];return u.jsxs("div",{className:c&&W.mapContainerHidden,children:[u.jsx(i,{open:l,subjectWell:s,wells:d,offsetWells:f,radius:m,formationColors:h,popUpFormatter:o(),coordsDataPath:"topHole.coordinates",onAddOffsetWell:b,onDeleteOffsetWell:j}),!q&&u.jsx(t,{formations:R,formationColors:h})]})}m.propTypes={open:f.default.bool.isRequired,subjectWell:f.default.shape({}),wells:f.default.arrayOf(f.default.shape({})).isRequired,offsetWells:f.default.arrayOf(f.default.shape({})).isRequired,radius:f.default.number,mapHidden:f.default.bool.isRequired,isMobile:f.default.bool.isRequired,onAddOffsetWell:f.default.func.isRequired,onDeleteOffsetWell:f.default.func.isRequired},m.defaultProps={subjectWell:null,radius:null};var c=r.memo(m);module.exports=c;
//# sourceMappingURL=index.js.map
