import{j as e}from"./@radix-CFOkMR_E.js";import{B as d,p as l,c as m,S as x,a0 as u,r as f,az as p}from"./index-DK1ynKjA.js";import{S as h}from"./database-1xWSgZfO.js";import{L as j}from"./@react-router-CO-OsFwI.js";import"./@tanstack-DYiOyJUL.js";import"./@reactflow-DJfzkHO1.js";function o({icon:t,estimatedTime:r,subtitle:a,title:s,comingSoon:i=!1,isRecommended:c=!1}){return e.jsxs(d,{className:`h-full w-full space-y-1 px-6 py-5 ${i&&"bg-neutral-50"}`,children:[t,e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:s}),c&&e.jsx(l,{className:"font-semibold",color:"green",size:"sm",children:"Recommended"}),i&&e.jsx(l,{className:"font-semibold",color:"purple",size:"sm",children:"Coming Soon"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:a}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",r," mins"]})]})}function g(){const{isError:t,isPending:r,data:a}=m();if(r)return e.jsx(x,{className:"h-[200px] w-full"});if(t)return e.jsx("div",{children:"Failed to load server info"});const s=u(a.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Smart Stack Setup"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to connect to your Cloud in a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(y,{isLocalDeployment:s}),e.jsx(N,{isLocalDeployment:s})]})]})}function y({isLocalDeployment:t}){return e.jsxs("div",{className:"relative",children:[t&&e.jsx(n,{}),e.jsx(j,{to:f.stacks.create.newInfra,children:e.jsx(o,{title:"New Infrastructure",isRecommended:!0,subtitle:"Use a script to set a new cloud infrastructure from scratch",icon:e.jsx(h,{className:"h-6 w-6 fill-primary-400"}),estimatedTime:"3"})})]})}function N({isLocalDeployment:t}){return e.jsxs("div",{className:"relative",children:[t&&e.jsx(n,{}),e.jsx(o,{comingSoon:!0,title:"Use existing Cloud",subtitle:"Connect to your existing Cloud and configure your components manually.",icon:e.jsx(p,{className:"h-6 w-6 fill-primary-400"}),estimatedTime:"15"})]})}function n(){return e.jsx("div",{className:"group absolute flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"Smart Setup is not available for local deployments"})})}function L(){return e.jsx("section",{className:"layout-container flex gap-2 p-5",children:e.jsx(g,{})})}export{L as default};
