import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-DnR6WYuU.js";import{r as h}from"./vendor-react-CTtPmzVP.js";import{aT as S,w as p}from"./vendor-ux-DTEmWsko.js";import{a as C}from"./page-header-CHAwrgX-.js";import{Y as g}from"./index-BZxsCCR_.js";import{o as b}from"./vendor-arcblock-CIBaEWEy.js";import{u as k}from"./config-space-LrsWMRQl.js";import{C as y,D as w,a as v}from"./connect-to-Bimfzs2e.js";import{S as c}from"./step-actions-Bejkv1Kq.js";import{S as T}from"./layout-Rdrg1NRp.js";import"./vendor-utils-CxWN1dT3.js";import"./vendor-hooks-qxhUUbW5.js";import"./lottie-web-4koyQiv_.js";import"./spaces-DBCz6tUn.js";import"./api-FQQlzPOP.js";import"./index-CnCY99ka.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-BqdvWprH.js";import"./index-DBs9Ljax.js";import"./use-mobile-D5clNlrm.js";import"./content-layout-DmSBGGVm.js";function E({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(w,{}),o?.capabilities?.didSpace&&t.jsx(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px"},children:t.jsx(v,{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};
