import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-CnXrAOs3.js";import{r as h}from"./vendor-react-Dvs43sk9.js";import{p as S,n as p}from"./vendor-ux-IiQnod3w.js";import{a as C}from"./page-header-DCvzRay5.js";import{ac as g}from"./index-sNHCLgAE.js";import{o as b}from"./vendor-arcblock-CuFtPveO.js";import{u as k}from"./config-space-zpk7zMxf.js";import{C as y,D as v,a as w}from"./connect-to-CmnRyCBb.js";import{S as c}from"./step-actions-thgNsMmu.js";import{S as E}from"./layout-Ccrs-yyw.js";import"./vendor-utils-cJEl_UEd.js";import"./vendor-hooks-CjESGRlR.js";import"./lottie-web-4koyQiv_.js";import"./spaces-B0p4-23K.js";import"./api-Btn0Tp3W.js";import"./index-COTazo1u.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-DicW-7Bz.js";import"./index-DBs9Ljax.js";import"./use-mobile-DCNBsOlH.js";import"./content-layout-oyz1EqNZ.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};
