import{j as t,a7 as f,al as r,aT as j,X as n}from"./vendor-mui-core-D7t4vMS5.js";import{r as h}from"./vendor-react-DX7tU9aY.js";import{b3 as S,b4 as p}from"./vendor-ux-Dl3wVbv_.js";import{a as C}from"./page-header-B0HpJClf.js";import{V as b}from"./index-Ca33rdd_.js";import{o as g}from"./vendor-arcblock-ivFYo5vP.js";import{u as y}from"./config-space-HmsYCb6s.js";import{C as k,D as v,a as w}from"./connect-to-C3ac4B-g.js";import{S as c}from"./step-actions-CArEuzNw.js";import{S as T}from"./layout-CydCBGqn.js";import"./vendor-utils-BzQg432x.js";import"./vendor-hooks-DAZ1H6Va.js";import"./spaces-Ckljlc4d.js";import"./api-B8JXuhVp.js";import"./index-Cw8Yly1u.js";import"./index-D29L5UKE.js";import"./index-BojVbZw0.js";import"./index-_bvucGkF.js";import"./index-DBs9Ljax.js";import"./use-mobile-TAIHvgoJ.js";import"./content-layout-CanSZTqf.js";function E({onNext:a=()=>{},onPrevious:d=()=>{}}){const{t:e}=h.useContext(S),{blocklet:o}=b(),{spaceGateway:l,settingStorageEndpoint:m,updateSpaceGateway:u,hasStorageEndpoint:x,loading:i,storageEndpoint:s}=y();return i?t.jsx(g,{relative:"parent",children:t.jsx(f,{})}):t.jsxs(B,{children:[t.jsx("div",{className:"header",children:t.jsx(C,{title:e("setup.didSpace.title"),subTitle:e("setup.didSpace.subTitle"),onClickBack:d})}),t.jsxs(r,{className:"form-container",sx:{width:"100%",maxWidth:"720px"},children:[x?t.jsx(k,{spaceGateway:l,settingStorageEndpoint:m}):t.jsx(v,{}),o?.capabilities?.didSpace&&t.jsx(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px"},children:t.jsx(w,{onConnect:u,storageEndpoint:s})})]}),o?.capabilities?.didSpace==="required"&&t.jsx(c,{mt:8,children:t.jsx(p,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>a(),children:e("setup.continue")})}),o?.capabilities?.didSpace==="optional"&&t.jsx(c,{blocklet:o,onStartNow:()=>a("complete"),children:t.jsx(p,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>a(),children:e(s?"setup.continue":"setup.skip")})})]})}E.propTypes={onNext:n.func,onPrevious:n.func};const B=j(T)`
  height: 100%;
  overflow-y: auto;
`;export{E as default};
