"use strict";(self.webpackChunkcentreon=self.webpackChunkcentreon||[]).push([["3644"],{90297:function(e,n,t){t.d(n,{A:()=>l,Y:()=>i});var r,a,i=((r={}).Base="base",r.Poller="poller",r.Remote="remote",r),l=((a={})[a.Next=0]="Next",a[a.Apply=1]="Apply",a)},45575:function(e,n,t){t.r(n),t.d(n,{default:()=>G});var r,a,i,l=t(9697),o=t(26298),u=t(76333),c=t(28206),s=t(29934),f=t(5957),p=t(29063),m=t(9697),d=(0,s.n9)()(function(e){return{skeleton:{height:e.spacing(5),width:"100%"},skeletonContainer:{columnGap:e.spacing(3),display:"flex",flexDirection:"column",width:"100%"}}});let v=function(){var e=d().classes;return m.createElement("div",{className:e.skeletonContainer},m.createElement(p.A,{className:e.skeleton,variant:"rectangular"}))};var h=t(41072),y=t(9697),g=(0,s.n9)()(function(e){return{page:{height:"fit-content",margin:"0 auto",padding:e.spacing(2,0),width:"40%"}}});let b=function(e){var n=e.children,t=g().classes;return y.createElement(h.A,{className:t.page},n)};var w=t(90297),A=t(69873),E=t(38075),S=t(60092),Y=t(93771),k=t(9697);let z=function(e){var n=e.steps,t=e.activeStep,r=(0,A.useTranslation)().t;return k.createElement(E.A,{alternativeLabel:!0,activeStep:t},n.map(function(e){return k.createElement(S.A,{key:e},k.createElement(Y.A,null,r(e)))}))};var x=t(9697);function P(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(t=a.next()).done)&&(i.push(t.value),!n||i.length!==n);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return P(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var R=(0,l.lazy)(function(){return t.e("605").then(t.bind(t,99308))}),B=(0,l.lazy)(function(){return t.e("5343").then(t.bind(t,35586))}),T=(0,l.lazy)(function(){return t.e("3522").then(t.bind(t,48297))}),j=(0,l.lazy)(function(){return t.e("8698").then(t.bind(t,67009))}),H=(0,l.lazy)(function(){return t.e("6455").then(t.bind(t,78026))}),I=(0,l.lazy)(function(){return Promise.all([t.e("2845"),t.e("3853")]).then(t.bind(t,34508))}),L=(0,l.lazy)(function(){return Promise.all([t.e("2845"),t.e("7364")]).then(t.bind(t,37695))}),O=[C({},w.Y.Base,R),(C(r={},w.Y.Remote,B),C(r,w.Y.Poller,T),r),(C(a={},w.Y.Remote,j),C(a,w.Y.Poller,H),a),(C(i={},w.Y.Remote,I),C(i,w.Y.Poller,L),i)],D=["Select a server type","Configure a server","Add an advanced configuration","Finish the setup"],F=(0,s.n9)()(function(e){return{wrapper:{margin:e.spacing(2,4)}}});let G=function(){var e,n=F().classes,t=N((0,l.useState)(0),2),r=t[0],a=t[1],i=N((0,l.useState)(w.Y.Base),2),s=i[0],p=i[1],m=N((0,l.useState)(window.innerHeight),2),d=m[0],h=m[1],y=(0,l.useRef)(null),g=function(){h(window.innerHeight)};(0,l.useEffect)(function(){return window.addEventListener("resize",g),function(){window.removeEventListener("resize",g)}},[]);var A=(0,o.A)([r,(0,u.A)(r,0)?w.Y.Base:s],O);if((0,c.A)(A))return null;var E=d-((null==(e=y.current)?void 0:e.getBoundingClientRect().top)||0);return x.createElement(b,null,x.createElement(z,{activeStep:r,steps:D}),x.createElement(f.A,{ref:y,sx:{maxHeight:E,overflowY:"auto"}},x.createElement("div",{className:n.wrapper},x.createElement(l.Suspense,{fallback:x.createElement(v,null)},x.createElement(A,{changeServerType:function(e){p(e)},goToNextStep:function(){a(function(e){return e+1})},goToPreviousStep:function(){a(function(e){return e-1})}})))))}}}]);
//# sourceMappingURL=3644.cc3c3e7a71adc10c.914fcaf9f95bc81b.d9c6ad45f12e48bd.js.map