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-KtPBvlG0.js";import{a as C}from"./page-header-CHAwrgX-.js";import{Y as g}from"./index-DGg3AL9l.js";import{o as b}from"./vendor-arcblock-DRfhQ9Yl.js";import{u as k}from"./config-space-DnDf6PO2.js";import{C as y,D as w,a as v}from"./connect-to-DNZM_E4B.js";import{S as c}from"./step-actions-BGJwIEbT.js";import{S as T}from"./layout-PDwTMZS3.js";import"./vendor-utils-BqKQizRf.js";import"./vendor-hooks-DpqqC65c.js";import"./lottie-web-4koyQiv_.js";import"./spaces-DKfk45f5.js";import"./api-2a4FTO9k.js";import"./index-Bh8glecC.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-CeGNmiXz.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};
