import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-BPQ6AEW_.js";import{r as h}from"./vendor-react-CUXIiAnY.js";import{p as S,n as p}from"./vendor-ux-r9bApERu.js";import{a as C}from"./page-header-BkgoSN-0.js";import{ac as g}from"./index-DY2wgD65.js";import{o as b}from"./vendor-arcblock-D8WYBDYe.js";import{u as k}from"./config-space-D3N5gAYj.js";import{C as y,D as v,a as w}from"./connect-to-loiyl2FX.js";import{S as c}from"./step-actions-D5Cu9stE.js";import{S as E}from"./layout-PANci1G8.js";import"./vendor-utils-BgSaqjGx.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./spaces-Cgv_XshJ.js";import"./api-uGeIZn4a.js";import"./index-CTf9yUdG.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-CJ1z6qNA.js";import"./index-DBs9Ljax.js";import"./use-mobile-C5RjvO7g.js";import"./content-layout-B-2tfq3i.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};
