(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{19785:function(e){var t=Array.isArray;e.exports=t},8828:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return i(13216)}])},81836:function(e,t,i){"use strict";var n=i(24246),r=i(27378),s=i(69746),l=i(79894),a=i.n(l);t.Z=e=>{let{breadcrumbs:t,fontSize:i="2xl",fontWeight:l="semibold",separator:d="->",lastItemStyles:o={color:"black"},normalItemStyles:c={color:"gray.500"},...u}=e;return(0,n.jsx)(s.aGc,{separator:d,fontSize:i,fontWeight:l,"data-testid":"breadcrumbs",...u,children:t.map((e,i)=>{let l=i+1===t.length;return e.title?(0,r.createElement)(s.gN6,{...c,...l?o:{},key:e.title,children:[(null==e?void 0:e.icon)&&(0,n.jsx)(s.xuv,{mr:2,children:e.icon}),e.link?(0,n.jsx)(s.Atw,{as:a(),href:e.link,isCurrentPage:l,children:e.title}):(0,n.jsx)(s.Atw,{_hover:{textDecoration:"none",cursor:"default"},isCurrentPage:l,children:e.title})]}):null})})}},11574:function(e,t,i){"use strict";var n=i(24246),r=i(69746),s=i(36848);t.Z=e=>{let{data:t,border:i="partial",borderWidth:l=2,...a}=e;return(0,n.jsx)(r.mQc,{colorScheme:"complimentary",...a,children:(0,n.jsx)(r.tdY,{width:"partial"===i?"max-content":void 0,borderBottomWidth:l,children:t.map(e=>(0,n.jsx)(s.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:a.fontSize},e.label))})})}},58665:function(e,t,i){"use strict";var n=i(24246),r=i(69746);t.Z=e=>{let{...t}=e;return(0,n.jsx)(r.kCb,{boxSize:"full",align:"center",justify:"center",children:(0,n.jsx)(r.$jN,{color:"primary",...t})})}},37541:function(e,t,i){"use strict";var n=i(24246),r=i(69746),s=i(19785),l=i.n(s),a=i(27378),d=i(81836);t.Z=e=>{let{breadcrumbs:t,isSticky:i=!0,children:s,rightContent:o,...c}=e;return(0,n.jsxs)(r.xuv,{bgColor:"white",paddingY:5,...i?{position:"sticky",top:0,left:0,zIndex:10}:{},...c,children:[(0,n.jsxs)(r.kCb,{alignItems:"flex-start",children:[(0,n.jsxs)(r.xuv,{flex:1,children:[l()(t)&&(0,n.jsx)(r.xuv,{marginBottom:s?4:0,children:(0,n.jsx)(d.Z,{breadcrumbs:t})}),(0,a.isValidElement)(t)&&t]}),o&&(0,n.jsx)(r.xuv,{children:o})]}),s]})}},13216:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return k}});var n=i(24246),r=i(69746),s=i(86677),l=i(27378),a=i(44296),d=e=>{let{data:t,...i}=e;return(0,n.jsx)(r.mQc,{colorScheme:"complimentary",...i,children:(0,n.jsx)(r.nPR,{children:t.map(e=>(0,n.jsx)(r.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})})},o=i(11574),c=i(11596),u=i(58665),x=i(60136),h=i(62528),m=i(43124),f=i(11032),j=i(37541),b=i(96878),p=i(22153),y=i(62711),g=i(32141),v=i(97356),k=()=>{let e=(0,s.useRouter)(),t=(0,a.T)(),i="";e.query.id&&(i=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:k,isLoading:w}=(0,p.rn)(i,{skip:!i}),{error:_,isLoading:C}=(0,b.Rd)(),{tcf:Z}=(0,c.hz)(),{flags:S}=(0,c.Vb)(),z=S.dataDiscoveryAndDetection,A=(0,a.C)(y.gU);(0,l.useEffect)(()=>{if(t((0,p.db)(k)),k){let e=Z&&!!k.vendor_id&&(0,x.cj)(k.vendor_id)===x.c6.GVL;t((0,y.gQ)(e))}else(0,y.gQ)(!1)},[k,t,Z]);let{tabData:E,tabIndex:N,onTabChange:P}=(0,v.Z)({isCreate:!1});return(w||C)&&!_?(0,n.jsx)(m.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):(0,n.jsxs)(m.Z,{title:"System inventory",mainProps:{paddingTop:0},children:[(0,n.jsx)(j.Z,{breadcrumbs:[{title:"System inventory",link:f.So},{title:(null==k?void 0:k.name)||""}],isSticky:!0,children:(0,n.jsxs)(r.xuv,{position:"relative",children:[(0,n.jsx)(o.Z,{data:E,"data-testid":"system-tabs",index:N,isLazy:!0,isManual:!0,onChange:P,width:"full",border:"full-width"}),z&&(0,n.jsxs)(r.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(f.KH),children:[(0,n.jsx)(r.xvT,{children:"Integrations"}),(0,n.jsx)(h.A5,{marginLeft:2})]})]})}),A?(0,n.jsx)(g.Z,{}):null,k||w||C?(0,n.jsx)(r.gCW,{alignItems:"stretch",flex:"1",gap:"18px",maxWidth:"70vw",children:(0,n.jsx)(d,{data:E,index:N,isLazy:!0,isManual:!0,onChange:P})}):(0,n.jsxs)(r.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",i]})]})}}},function(e){e.O(0,[8033,4833,7827,8141,2017,1735,5968,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);