import{r as c,aJ as t}from"./@ui-core-DKdciH1Z.js";import{c as x}from"./index-D7KLAbvI.js";import{T as m}from"./Tick-D4fEI6dP.js";const a=c.createContext(null);function S({children:e,initialStep:s=0,maxSteps:r}){const[n,i]=c.useState(s);function d(){i(o=>o+1)}function l(){i(o=>o-1)}return t.jsx(a.Provider,{value:{currentStep:n,setCurrentStep:i,maxSteps:r,goToNextStep:d,goToPreviousStep:l},children:e})}function u(){const e=c.useContext(a);if(e===null)throw new Error("useWizardContext must be used within a WizardProvider");return e}function v({entries:e}){return t.jsx("aside",{className:"whitespace-nowrap p-2 text-text-sm",children:t.jsx("ul",{className:"space-y-5",children:e.map((s,r)=>t.jsx("li",{children:t.jsx(f,{index:r,children:s})},r))})})}function f({index:e,children:s}){const{currentStep:r}=u(),n=x("font-semibold flex items-center gap-1",{"text-theme-text-tertiary":e<r,"text-theme-text-secondary":e>r});return t.jsxs("div",{className:n,children:[t.jsx(p,{index:e}),t.jsx("span",{children:s})]})}function p({index:e}){const{currentStep:s}=u(),r=e+1;if(s>e)return t.jsx(m,{className:"h-5 w-5",tickClasses:"w-3 h-3"});if(s===e)return t.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-rounded bg-primary-300 text-white",children:r});if(s<e)return t.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-rounded bg-neutral-300	 text-white",children:r})}export{v as L,S as W,u};
