"use strict";var e=require("moment"),t=require("@material-ui/icons/Delete"),s=require("@material-ui/icons/CenterFocusStrong"),a=require("./popup.css.js"),l=require("react/jsx-runtime");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),o=i(t),c=i(s),r="popupGenerator";module.exports=function(e,t,s,i){return function(u){var d=u.well,p=u.color,m=t.includes(d.id),f=e&&e.id===d.id;return l.jsxs("div",{className:a.popup,children:[l.jsxs("div",{children:[l.jsx("div",{className:a.wellColor,style:{backgroundColor:p}}),l.jsx("span",{className:a.wellName,children:d.name})]}),l.jsxs("div",{className:a.popupInfo,children:["Well Depth:",Number.isFinite(d.rigReleaseDate)?"".concat(Math.floor(d.totalDepth)," ft"):"N/A"]}),l.jsxs("div",{className:a.popupInfo,children:["Release Date:",Number.isFinite(d.rigReleaseDate)?n.default.unix(d.rigReleaseDate).format("MM/DD/YYYY"):"N/A"]}),l.jsxs("div",{className:a.popupActions,children:[f?l.jsxs("div",{"data-testid":"".concat(r,"_removeSubjectWell"),className:a.popupButton,onClick:function(){return s(d.id,f)},children:[l.jsx("div",{className:a.popupButtonIcon,children:l.jsx(o.default,{})}),l.jsx("div",{className:a.popupButtonLabel,children:"Remove Subject Well"})]}):l.jsxs("div",{"data-testid":"".concat(r,"_setSubjectWell"),className:a.popupButton,onClick:function(){return s(d.id,f)},children:[l.jsx("div",{className:a.popupButtonIcon,children:l.jsx(c.default,{})}),l.jsx("div",{className:a.popupButtonLabel,children:"Set Subject Well"})]}),!f&&l.jsx("div",{className:"".concat(a.popupButton," ").concat(a.popupButtonContained),onClick:function(){return i(d.id,m)},children:m?l.jsx("div",{"data-testid":"".concat(r,"_removeOffsetWell"),className:a.popupButtonLabel,children:"Remove Offset"}):l.jsx("div",{"data-testid":"".concat(r,"_selectOffsetWell"),className:a.popupButtonLabel,children:"Select As Offset"})})]})]})}};
//# sourceMappingURL=popupGenerator.js.map
