"use strict";(self.webpackChunkname=self.webpackChunkname||[]).push([[7108],{22802:(e,t,n)=>{var r,a;n.d(t,{D:()=>r,p:()=>a}),function(e){e.Base="base",e.Poller="poller",e.Remote="remote"}(r||(r={})),function(e){e[e.Next=0]="Next",e[e.Apply=1]="Apply"}(a||(a={}))},77108:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j});var r=n(81672),a=n(79895),i=n(16779),l=n(99226),o=n(22802),c=n(21987),u=(0,i.Z)((function(e){return{page:{height:"fit-content",margin:"0 auto",padding:e.spacing(2,0),width:"40%"}}}));const s=function(e){var t=e.children,n=u();return React.createElement(c.Z,{className:n.page},t)};var f=n(63397),m=n(10789),p=n(74791),d=n(80003);const v=function(e){var t=e.steps,n=e.activeStep,r=(0,f.useTranslation)().t;return React.createElement(m.Z,{alternativeLabel:!0,activeStep:n},t.map((function(e){return React.createElement(p.Z,{key:e},React.createElement(d.Z,null,r(e)))})))};var h=n(22054),y=(0,i.Z)((function(e){return{skeleton:{height:e.spacing(5),width:"100%"},skeletonContainer:{columnGap:e.spacing(3),display:"flex",flexDirection:"column",width:"100%"}}}));const g=function(){var e=y();return React.createElement("div",{className:e.skeletonContainer},React.createElement(h.Z,{className:e.skeleton,variant:"rectangular"}))};function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],l=!0,o=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){o=!0,a=e}finally{try{l||null==n.return||n.return()}finally{if(o)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E,S,P,k=(0,r.lazy)((function(){return Promise.all([n.e(4133),n.e(2994)]).then(n.bind(n,28756))})),D=(0,r.lazy)((function(){return Promise.all([n.e(5567),n.e(1229),n.e(3106),n.e(1023),n.e(1389),n.e(3828),n.e(3805)]).then(n.bind(n,53805))})),z=(0,r.lazy)((function(){return Promise.all([n.e(5567),n.e(1229),n.e(3106),n.e(1023),n.e(1389),n.e(5980),n.e(5544)]).then(n.bind(n,15544))})),A=(0,r.lazy)((function(){return Promise.all([n.e(5567),n.e(1229),n.e(3106),n.e(1023),n.e(1389),n.e(4723),n.e(454),n.e(9250),n.e(5314)]).then(n.bind(n,5314))})),Z=(0,r.lazy)((function(){return Promise.all([n.e(5567),n.e(1229),n.e(3106),n.e(1023),n.e(1389),n.e(4723),n.e(454),n.e(9250),n.e(3245),n.e(693)]).then(n.bind(n,70693))})),x=(0,r.lazy)((function(){return Promise.all([n.e(4723),n.e(9250),n.e(6651),n.e(7836)]).then(n.bind(n,27836))})),C=(0,r.lazy)((function(){return Promise.all([n.e(4723),n.e(6651),n.e(5552)]).then(n.bind(n,5552))})),N=[w({},o.D.Base,k),(E={},w(E,o.D.Remote,D),w(E,o.D.Poller,z),E),(S={},w(S,o.D.Remote,A),w(S,o.D.Poller,Z),S),(P={},w(P,o.D.Remote,x),w(P,o.D.Poller,C),P)],T=["Select a server type","Configure a server","Add an advanced configuration","Finish the setup"],B=(0,i.Z)((function(e){return{wrapper:{margin:e.spacing(2,4)}}}));const j=function(){var e,t=B(),n=R((0,r.useState)(0),2),i=n[0],c=n[1],u=R((0,r.useState)(o.D.Base),2),f=u[0],m=u[1],p=R((0,r.useState)(window.innerHeight),2),d=p[0],h=p[1],y=(0,r.useRef)(null),b=function(){h(window.innerHeight)};(0,r.useEffect)((function(){return window.addEventListener("resize",b),function(){window.removeEventListener("resize",b)}}),[]);var w=(0,a.ETc)([i,(0,a.fS0)(i,0)?o.D.Base:f],N);if((0,a.kKJ)(w))return null;var E=d-((null===(e=y.current)||void 0===e?void 0:e.getBoundingClientRect().top)||0);return React.createElement(s,null,React.createElement(v,{activeStep:i,steps:T}),React.createElement(l.Z,{ref:y,sx:{maxHeight:E,overflowY:"auto"}},React.createElement("div",{className:t.wrapper},React.createElement(r.Suspense,{fallback:React.createElement(g,null)},React.createElement(w,{changeServerType:function(e){m(e)},goToNextStep:function(){c((function(e){return e+1}))},goToPreviousStep:function(){c((function(e){return e-1}))}})))))}}}]);