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