import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{m as i,h as d,r as m,ad as u,I as x,R as p}from"./index-D2iSHVZq.js";import{T as f}from"./Tick-CEsT3HPR.js";import{c as h}from"./persist-D87V82eO.js";import{c as j}from"./@react-router-CNP6g_RL.js";import{b as N}from"./index.esm-D7jFlf5N.js";const o=c.createContext(null);function P({children:t,initialStep:r=0,maxSteps:s}){const[a,n]=c.useState(r);return e.jsx(o.Provider,{value:{currentStep:a,setCurrentStep:n,maxSteps:s},children:t})}function l(){const t=c.useContext(o);if(t===null)throw new Error("useWizardContext must be used within a WizardProvider");return t}function W({entries:t}){return e.jsx("aside",{className:"whitespace-nowrap p-2 text-text-sm",children:e.jsx("ul",{className:"space-y-5",children:t.map((r,s)=>e.jsx("li",{children:e.jsx(y,{index:s,children:r})},s))})})}function y({index:t,children:r}){const{currentStep:s}=l(),a=i("font-semibold flex items-center gap-1",{"text-theme-text-tertiary":t<s,"text-theme-text-secondary":t>s});return e.jsxs("div",{className:a,children:[e.jsx(b,{index:t}),e.jsx("span",{children:r})]})}function b({index:t}){const{currentStep:r}=l(),s=t+1;if(r>t)return e.jsx(f,{className:"h-5 w-5",tickClasses:"w-3 h-3"});if(r===t)return e.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-rounded bg-primary-300 text-white",children:s});if(r<t)return e.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-rounded bg-neutral-300	 text-white",children:s})}function B(){const t=j();function r(){h(),t(m.stacks.create.index)}return e.jsx(d,{onClick:()=>r(),intent:"secondary",size:"md",children:"Cancel"})}function I(t){switch(t){case"aws":return"AWS";case"azure":return"Azure";case"gcp":return"GCP";default:return"Provider"}}function R(){var s;const{register:t,formState:{errors:r}}=N();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(u,{className:"h-5 w-5 fill-primary-400"}),"Select a name for your Stack"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please select a name for your stack, that is not used already."})]}),e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs("div",{className:"space-y-1",children:[e.jsx(x,{className:`${r.stackName?"border-red-500":""}`,placeholder:"zenml-remote-stack",...t("stackName")}),r.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(s=r.stackName.message)==null?void 0:s.toString()})]})})]})}const v=c.forwardRef(({children:t,className:r,id:s,...a},n)=>e.jsxs("div",{className:"min-h-[160px] min-w-[160px]",children:[e.jsx("input",{id:s,...a,ref:n,className:i("peer sr-only",r),type:"radio"}),e.jsx("label",{htmlFor:s,className:"flex h-full w-full flex-col items-start justify-center space-y-5 rounded-md border border-theme-border-minimal bg-theme-surface-primary p-5 text-text-lg text-theme-text-secondary hover:cursor-pointer	peer-checked:border-primary-100 peer-checked:bg-primary-25 peer-focus-visible:border-primary-100 peer-disabled:cursor-default peer-disabled:bg-neutral-50",children:t})]}));v.displayName="CloudProviderRadioButton";function E({icon:t,title:r,subtitle:s,comingSoon:a}){return e.jsxs("div",{className:"space-y-1 text-left",children:[t,e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:r}),a&&e.jsx(p,{className:"font-semibold",color:"purple",size:"sm",children:"Coming Soon"})]}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s})]})}export{v as C,W as L,E as P,R as S,P as W,B as a,I as g,l as u};
