import{j as t,a7 as f,al as r,aT as j,X as n}from"./vendor-mui-core-CDEc-eG6.js";import{r as h}from"./vendor-react-DX7tU9aY.js";import{b4 as S,b5 as p}from"./vendor-ux-bFYdDLNG.js";import{a as C}from"./page-header-CEL5h6do.js";import{V as b}from"./index-DGZk149v.js";import{o as g}from"./vendor-arcblock-DY2miJjh.js";import{u as y}from"./config-space-B2Ba5sf-.js";import{C as k,D as v,a as w}from"./connect-to-BqtlydjT.js";import{S as c}from"./step-actions-DiRyepq4.js";import{S as T}from"./layout-D7JBXyAe.js";import"./vendor-utils-_C9URqjS.js";import"./vendor-hooks-BrgYeCrj.js";import"./spaces-Cf-lxsd-.js";import"./api-Bo6lutcq.js";import"./index-cDcYHAdY.js";import"./index-D29L5UKE.js";import"./index-BojVbZw0.js";import"./index-C0DMF4Dq.js";import"./index-DBs9Ljax.js";import"./use-mobile-DUKvJoqs.js";import"./content-layout-D49-hpq6.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};
