import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-CKKG_1TN.js";import{r as h}from"./vendor-react-CTtPmzVP.js";import{b9 as S,F as p}from"./vendor-ux-DjXlxcvL.js";import{a as C}from"./page-header-BZv-tfgN.js";import{Y as g}from"./index-BEfIUbZC.js";import{o as b}from"./vendor-arcblock-BCP2x3BR.js";import{u as k}from"./config-space-BZQrckxG.js";import{C as y,D as v,a as w}from"./connect-to-CVH3cw77.js";import{S as c}from"./step-actions-Cb6B0FCJ.js";import{S as E}from"./layout-DRVZ4L0D.js";import"./vendor-utils-CUs2ebe7.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";import"./spaces-DghHe7uP.js";import"./api-B24x7kOD.js";import"./index-CNGNZ6kv.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-BB8sYq-N.js";import"./index-DBs9Ljax.js";import"./use-mobile-Bz2ML4Gk.js";import"./content-layout-Dtfb5X6M.js";function T({onNext:a=()=>{},onPrevious:d=()=>{}}){const{t:e}=h.useContext(S),{blocklet:o}=g(),{spaceGateway:m,settingStorageEndpoint:l,updateSpaceGateway:u,hasStorageEndpoint:x,loading:i,storageEndpoint:s}=k();return i?t.jsx(b,{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(y,{spaceGateway:m,settingStorageEndpoint:l}):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")})})]})}T.propTypes={onNext:n.func,onPrevious:n.func};const B=j(E)`
  height: 100%;
  overflow-y: auto;
`;export{T as default};
