import e from"classnames";import l from"moment";import o from"@material-ui/icons/Info";import i from"@material-ui/icons/Block";import t from"./WellTooltip.module.css.js";import{jsxs as a,jsx as m}from"react/jsx-runtime";var s=function(){return function(s){var n=s.isViewOnly,r=s.well,c=s.color,f=s.isOffsetWell,d=s.isSubjectWell,p=s.offset,N=s.isClickable;return a("div",{className:t.wellTooltip,style:{marginLeft:null==p?void 0:p[0],marginTop:null==p?void 0:p[1]},children:[m("span",{className:e(t.commonItem,t.wellName),children:r.name}),a("div",{className:t.tooltipItem,children:["Depth: ",Number.isFinite(r.totalDepth)?Math.floor(r.totalDepth).toFixed(2):"N/A",Number.isFinite(r.totalDepth)&&m("span",{className:t.unit,children:" ft"})]}),a("div",{className:e(t.commonItem,t.tooltipItem),children:["Release Date: ",Number.isFinite(r.rigReleaseDate)?l.unix(r.rigReleaseDate).format("MM/DD/YYYY"):"N/A"]}),a("div",{className:e(t.commonItem,t.formationItem),children:["Target Formation:",m("div",{className:t.formation,style:{backgroundColor:c}}),r.formation]}),!n&&!d&&N&&a("div",{className:e(t.commonItem,t.info),children:[f?m(i,{className:t.blockIcon}):m(o,{className:t.infoIcon}),m("span",f?{className:t.infoLabel,children:"Click to deselect Offset Well"}:{className:t.infoLabel,children:"Click to select Offset Well"})]})]})}};export{s as WellTooltip};
