import{get as e}from"lodash";import{makeStyles as n,Typography as t}from"@material-ui/core";import{SEGMENTS as i}from"../../../constants/segment.js";import{jsxs as a,jsx as o}from"react/jsx-runtime";var r=n((function(e){return{rigAndWellContainer:{display:"flex",gap:"8px",alignItems:"flex-end"},contentAssetInfo:{color:e.palette.primary.main,width:"100%",fontSize:12},assetLink:{cursor:"pointer",display:"block",marginTop:e.spacing(.5),fontSize:"12px",pointerEvents:"auto",zIndex:1},stageNumber:{color:e.palette.primary.text6,fontSize:12}}})),l=function(n){var l,s,d,c,m,v,u=n.feedItem,p=r(),f=!!u.rig,g=function(e){var n,t,i;return e.rig?null===(n=e.rig)||void 0===n?void 0:n.name:null===(t=e.well)||void 0===t||null===(i=t.parent_asset)||void 0===i?void 0:i.name}(u),x=f?null===(l=u.rig)||void 0===l||null===(s=l.active_well)||void 0===s?void 0:s.name:null===(d=u.well)||void 0===d?void 0:d.name,N=f?null===(c=u.rig)||void 0===c||null===(m=c.active_well)||void 0===m?void 0:m.id:null===(v=u.well)||void 0===v?void 0:v.id,b=e(u,["segment",0])===i.COMPLETION&&e(u,["context","alert","stage_numbers",0]);return a("div",{className:p.rigAndWellContainer,children:[N?o("a",{"data-testid":"".concat("FeedPo","_wellLink"),className:p.assetLink,onClick:function(e){return e.stopPropagation()},href:"/assets/".concat(N,"/"),target:"_blank",rel:"noreferrer",children:a(t,{variant:"body2",className:p.contentAssetInfo,children:[g," - ",x]})}):a(t,{variant:"body2",className:p.contentAssetInfo,children:[g," - No Active Well"]}),b&&a(t,{variant:"body2",className:p.stageNumber,children:["Stage ",b]})]})};export{l as default};
//# sourceMappingURL=RigAndWell.js.map
