(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return i(51226)}])},66379:function(e,t,i){"use strict";var n=i(24246),s=i(91942),r=i(7617);t.Z=e=>{let{data:t,border:i="partial",borderWidth:l=2,...a}=e;return(0,n.jsx)(s.mQc,{colorScheme:"complimentary",...a,children:(0,n.jsx)(s.tdY,{width:"partial"===i?"max-content":void 0,borderBottomWidth:l,children:t.map(e=>(0,n.jsx)(r.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:a.fontSize},e.label))})})}},18225:function(e,t,i){"use strict";var n=i(24246),s=i(91942);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,n.jsx)(s.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(s.$jN,{color:"primary",...i})})}},51226:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(91942),r=i(86677),l=i(27378),a=i(16134),d=e=>{let{data:t,...i}=e;return(0,n.jsx)(s.mQc,{colorScheme:"complimentary",...i,children:(0,n.jsx)(s.nPR,{children:t.map(e=>(0,n.jsx)(s.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})})},c=i(66379),o=i(25980),u=i(18225),h=i(812),x=i(14048),m=i(77213),f=i(77830),j=i(58754),p=i(32885),y=i(1315),b=i(57865),g=i(72774),v=i(65626),_=()=>{let e=(0,r.useRouter)(),t=(0,a.T)(),i="";e.query.id&&(i=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:_,isLoading:w}=(0,y.rn)(i,{skip:!i}),{error:C,isLoading:S}=(0,p.Rd)(),{tcf:Z,plus:k}=(0,o.hz)(),z=(0,a.C)(b.gU);(0,l.useEffect)(()=>{if(t((0,y.db)(_)),_){let e=Z&&!!_.vendor_id&&(0,h.cj)(_.vendor_id)===h.c6.GVL;t((0,b.gQ)(e))}else(0,b.gQ)(!1)},[_,t,Z]);let{tabData:N,tabIndex:E,onTabChange:q}=(0,v.Z)({isCreate:!1});return(w||S)&&!C?(0,n.jsx)(m.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):(0,n.jsxs)(m.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(j.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:f.So},{title:(null==_?void 0:_.name)||""}],children:(0,n.jsxs)(s.xuv,{position:"relative",children:[(0,n.jsx)(c.Z,{data:N,"data-testid":"system-tabs",index:E,isLazy:!0,isManual:!0,onChange:q,width:"full",border:"full-width"}),k&&(0,n.jsxs)(s.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(f.KH),children:[(0,n.jsx)(s.xvT,{children:"Integrations"}),(0,n.jsx)(x.A5,{marginLeft:2})]})]})}),z?(0,n.jsx)(g.Z,{}):null,_||w||S?(0,n.jsx)(s.gCW,{alignItems:"stretch",children:(0,n.jsx)(d,{data:N,index:E,isLazy:!0,isManual:!0,onChange:q})}):(0,n.jsxs)(s.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",i]})]})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,5277,4481,7980,355,8499,3426,5626,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);