(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3754],{64105:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return T}});var t=s(23256),i=s(20440),r=s(41664),c=s.n(r),l=s(17140),o=s(43894),d=s(53700),a=s(11163),u=s(67294),x=s(97142),h=s(52313),m=s(87109),j=s(21885),f=s(90846),g=s(32523),y=s(37178),p=s(78522),b=s(48591),S=s(14416),v=s(37161),C=s(85893),z=function(e){var n,s=e.system,i=e.onAddNextSystem,r={organization:(0,S.useSelector)(v.mT).organization_fides_key}.organization,c=(0,x.C)((0,g.Jd)(r)),l=(0,x.T)(),d=(0,a.useRouter)(),u=c?c.filter((function(e){return e.name!==s.name})):[],h=null!==(n=s.name)&&void 0!==n?n:s.fides_key;return(0,C.jsx)(y.m$.form,{w:"100%",children:(0,C.jsxs)(t.Kq,{spacing:10,children:[(0,C.jsxs)(t.X6,{as:"h3",color:"green.500",size:"lg","data-testid":"success-page-heading",children:[(0,C.jsx)(t.Ct,{fontSize:"16px",margin:"10px",padding:"10px",variant:"solid",colorScheme:"green",children:"Success"}),h," successfully registered!"]}),(0,C.jsxs)(t.xv,{children:[h," has been successfully added to the registry!"]}),(0,C.jsx)(p.xJ,{children:(0,C.jsxs)(p.iA,{variant:"simple",children:[(0,C.jsx)(p.hr,{children:(0,C.jsx)(p.Tr,{children:(0,C.jsx)(p.Th,{pl:0,children:"System Name"})})}),(0,C.jsxs)(p.p3,{children:[(0,C.jsxs)(p.Tr,{children:[(0,C.jsx)(p.Td,{color:"green.500",children:h}),(0,C.jsx)(p.Td,{children:(0,C.jsx)(b.sc,{boxSize:5})})]}),u.map((function(e){return(0,C.jsxs)(p.Tr,{children:[(0,C.jsx)(p.Td,{children:e.name}),(0,C.jsx)(p.Td,{children:(0,C.jsx)(b.sc,{boxSize:5})})]},"".concat(e.fides_key,"-tr"))}))]})]})}),(0,C.jsx)(t.xv,{children:"You can continue to add more systems now or finish."}),(0,C.jsxs)(t.xu,{children:[(0,C.jsx)(o.zx,{onClick:i,mr:2,size:"sm",variant:"outline","data-testid":"add-next-system-btn",children:"Add next system"}),(0,C.jsx)(o.zx,{onClick:function(){l((0,g.db)(void 0)),d.push("/system")},colorScheme:"primary",size:"sm","data-testid":"finish-btn",children:"Finish"})]})]})})},_=["Describe","Declare","Review"],w=function(e){var n=e.steps,s=e.currentStepIndex,i=e.onChange;return(0,C.jsx)(t.Kq,{pl:5,children:n.map((function(e,n){var t=n===s;return(0,C.jsx)(o.zx,{variant:"ghost",colorScheme:t?"complimentary":"ghost",width:"fit-content",disabled:n>s,onClick:function(){return i(n)},children:e},e)}))})},k=function(){var e=(0,a.useRouter)(),n=(0,x.T)(),s=(0,u.useState)(0),i=s[0],r=s[1],c=(0,x.C)(g.NC),l=(0,d.hz)().flags.navV2,o=(0,u.useCallback)((function(){e.back(),n((0,g.db)(void 0))}),[n,e]),y=(0,u.useCallback)((function(e){r(i+1),n((0,g.db)(e))}),[i,n]),p=[{label:_[0],content:(0,C.jsx)(m.Z,{onSuccess:y,system:c})},{label:_[1],content:c?(0,C.jsx)(j.Z,{system:c,onSuccess:y}):null,isDisabled:!c},{label:_[2],content:c?(0,C.jsx)(f.Z,{system:c,onSuccess:function(){return r(i+1)}}):null,isDisabled:!c},{label:_[3],content:c?(0,C.jsx)(z,{system:c,onAddNextSystem:o}):null,isDisabled:!c}];return(0,C.jsxs)(C.Fragment,{children:[l&&(0,C.jsx)(t.gC,{alignItems:"stretch",flex:"1",gap:"18px",maxWidth:"70vw",children:(0,C.jsx)(h.Z,{data:p,"data-testid":"settings",flexGrow:1,index:i,isLazy:!0,onChange:r})}),!l&&(0,C.jsxs)(t.rj,{templateColumns:"3fr 7fr",maxWidth:"70vw",children:[(0,C.jsx)(t.P4,{children:(0,C.jsxs)(t.Kq,{spacing:3,fontWeight:"semibold","data-testid":"settings",children:[(0,C.jsx)(t.xv,{children:"Configuration Settings"}),(0,C.jsx)(w,{steps:_,currentStepIndex:i,onChange:r})]})}),(0,C.jsxs)(t.P4,{w:"75%",children:[0===i?(0,C.jsx)(m.Z,{onSuccess:y,system:c}):null,1===i&&c?(0,C.jsx)(j.Z,{system:c,onSuccess:y}):null,2===i&&c?(0,C.jsx)(f.Z,{system:c,onSuccess:function(){return r(i+1)}}):null,3===i&&c?(0,C.jsx)(z,{system:c,onAddNextSystem:o}):null]})]})]})},T=function(){return(0,C.jsxs)(l.Z,{title:"Systems",children:[(0,C.jsx)(t.X6,{mb:2,fontSize:"2xl",fontWeight:"semibold",children:"Configure your system"}),(0,C.jsx)(t.xu,{mb:8,children:(0,C.jsxs)(i.aG,{fontWeight:"medium",fontSize:"sm",color:"gray.600",children:[(0,C.jsx)(i.gN,{children:(0,C.jsx)(c(),{href:"/system",children:"System Connections"})}),(0,C.jsx)(i.gN,{children:(0,C.jsx)(c(),{href:"#",children:"Configure your connection"})})]})}),(0,C.jsx)(k,{})]})}},48752:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/system/configure",function(){return s(64105)}])}},function(e){e.O(0,[5372,7601,248,2350,6648,4231,440,8522,5657,6894,1144,4530,6049,7140,7080,9193,5056,9774,2888,179],(function(){return n=48752,e(e.s=n);var n}));var n=e.O();_N_E=n}]);