"use strict";var i=require("prop-types"),e=require("@material-ui/core"),r=require("../../../../Drillstring/BhaIndicator/BhaIndicator.js"),l=require("../../../../Drillstring/BHASchematic.js"),a=require("../../../../Drillstring/DrillstringDetail/DrillstringDetail.js"),t=require("../../../../../utils/convert.js"),n=require("../../../../../utils/bha.js"),s=require("react/jsx-runtime"),o=e.makeStyles({wrapper:{width:200,cursor:"pointer",marginTop:-52,marginBottom:-52},bhaDetail:{maxWidth:1500,maxHeight:"80%"}}),d=function(i){var d,g,D,h,u,c=i.feedItem,p=i.drillStringData,m=i.handleShowDrillstringDetailDialog,x=i.isShowDrillstringDetailDialog,j=i.handleHideDrillstringDetailDialog,q=o(),v=null===(d=c.well)||void 0===d?void 0:d.id,S=null===(g=c.context)||void 0===g||null===(D=g.bha)||void 0===D||null===(h=D.data)||void 0===h?void 0:h.id,f=n.getBHAInformation(v,S,p),w=n.calculateBHALengthMax(p),H=null===(u=f.data)||void 0===u?void 0:u.components,B=H&&n.getBHASchematic(H);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:q.wrapper,onClick:m,children:B&&s.jsx(l,{containerHeight:160,schematic:B,bhaLengthMax:w},v)}),s.jsx(r,{align:"left"}),s.jsx(e.Dialog,{classes:{paperScrollPaper:q.bhaDetail},open:x,onClose:j,scroll:"paper",children:s.jsx(e.DialogContent,{children:s.jsx(a,{drillStringInfo:f,unit:t.getUnitDisplay("length"),onDone:j})})})]})};d.propTypes={feedItem:i.shape().isRequired,drillStringData:i.arrayOf(i.shape()).isRequired,isShowDrillstringDetailDialog:i.bool.isRequired,handleShowDrillstringDetailDialog:i.func.isRequired,handleHideDrillstringDetailDialog:i.func.isRequired},module.exports=d;
//# sourceMappingURL=BhaSchematic.js.map
