(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return t(82657)}])},18225:function(e,r,t){"use strict";var s=t(24246),n=t(36010);r.Z=e=>{let{alignment:r="center",...t}=e;return(0,s.jsx)(n.ad9,{boxSize:"full",align:"center",justify:r,children:(0,s.jsx)(n.Y6B,{color:"primary",...t})})}},59849:function(e,r,t){"use strict";t.d(r,{Z:function(){return u}});var s=t(24246),n=t(36010),a=t(86677),i=t(88340);let l="/images/errors";var c=e=>{let{status:r}=e;return 404===r?(0,s.jsx)(n.Eep,{src:"".concat(l,"/404.svg"),alt:"Error 404",preview:!1}):500===r?(0,s.jsx)(n.Eep,{src:"".concat(l,"/500.svg"),alt:"Error 500",preview:!1}):(0,s.jsx)(n.Eep,{src:"".concat(l,"/unknown.svg"),alt:"Error Unknown",preview:!1})},o=t(812),u=e=>{let{error:r,defaultMessage:t="An unexpected error occurred.  Please try again",actions:l,showReload:u=!0}=e,d=(0,o.e$)(r,t),x="data"in r&&r.data?JSON.stringify(r.data):JSON.stringify(r),h="status"in r&&r.status?r.status:void 0,j=(0,a.useRouter)(),y=l&&l.length>0||u;return(0,s.jsx)(n.kCb,{vertical:!0,align:"center",justify:"center",className:"h-screen","data-testid":"error-page-result",children:(0,s.jsx)(n.x4B,{status:"error",icon:(0,s.jsx)(c,{status:h}),title:"Error ".concat(h),subTitle:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Typography.Paragraph,{type:"secondary",children:d}),(0,s.jsx)(n.kCb,{justify:"start",className:"max-w-96",children:(0,s.jsx)(n.UO1,{ghost:!0,size:"small",items:[{key:"1",label:"Show details",classNames:{header:"w-fit"},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Typography.Text,{type:"secondary",children:x}),(0,s.jsx)(i.Z,{copyText:x})]})}]})})]}),extra:y&&(0,s.jsxs)(n.kCb,{gap:"small",justify:"center",children:[null==l?void 0:l.map((e,r)=>(0,s.jsx)(n.zxk,{...e,children:e.label},r)),u&&(0,s.jsx)(n.zxk,{onClick:()=>j.reload(),type:"primary",children:"Reload"})]})})})}},82657:function(e,r,t){"use strict";t.r(r);var s=t(24246),n=t(36010),a=t(86677),i=t(27378),l=t(16134),c=t(59849),o=t(25980),u=t(18225),d=t(812),x=t(14048),h=t(77213),j=t(77830),y=t(58754),g=t(32885),p=t(1315),m=t(57865),f=t(72774),v=t(21103);r.default=()=>{let e=(0,a.useRouter)(),r=(0,l.T)(),t="";e.query.id&&(t=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:w,isLoading:b,error:k}=(0,p.rn)(t),{error:E,isLoading:_}=(0,g.Rd)(),{tcf:C,plus:N}=(0,o.hz)(),Z=(0,l.C)(m.gU);(0,i.useEffect)(()=>{if(w){let e=C&&!!w.vendor_id&&(0,d.cj)(w.vendor_id)===d.c6.GVL;r((0,m.gQ)(e))}else(0,m.gQ)(!1)},[w,r,C]);let{tabData:S,activeKey:T,onTabChange:z}=(0,v.Z)({isCreate:!1});return(b||_)&&!E?(0,s.jsx)(h.Z,{title:"Systems",children:(0,s.jsx)(u.Z,{})}):k?(0,s.jsx)(c.Z,{error:k,defaultMessage:"A problem occurred while fetching the system ".concat(t),actions:[{label:"Return to systems",onClick:()=>e.push(j.So)}]}):(0,s.jsxs)(h.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,s.jsx)(y.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:j.So},{title:(null==w?void 0:w.name)||""}]}),(0,s.jsx)(n.mQc,{activeKey:T,onChange:z,items:S,className:"w-full",tabBarExtraContent:N&&(0,s.jsxs)(n.zxk,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(j.KH),children:[(0,s.jsx)(n.Bjg,{children:"Integrations"}),(0,s.jsx)(x.A5,{marginLeft:2})]}),renderTabBar:(e,r)=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r,{...e}),Z&&(0,s.jsx)(f.Z,{})]})})]})}}},function(e){e.O(0,[431,454,5277,7245,409,401,7218,7879,7990,7079,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);