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