import{j as t}from"./fields-wnm5Jtc6.js";import"./vendor-D21mNUGX.js";import{P as e}from"./index-pmrLY__j.js";const o=({steps:s,activeStep:r=0})=>{const i=()=>r<0?0:r>s.length?s.length:r;return s[i()]?t.jsx("div",{children:s[i()]}):null};o.propTypes={activeStep:e.number,steps:e.arrayOf(e.element).isRequired};const a=({heading:s,stepActive:r,index:i})=>{const l=()=>{let n="acpt-steps-heading";return i===r?n+=" active":r>i?n+=" done":n+=" undone",n};return t.jsxs("div",{className:l(),children:[t.jsx("div",{className:"number",children:i+1}),t.jsx("h3",{className:"title",children:s.title}),s.description&&t.jsx("div",{className:"description",children:s.description})]})};a.propTypes={index:e.number.isRequired,stepActive:e.number.isRequired,heading:e.shape({label:e.string.isRequired,description:e.string.isRequired}).isRequired};const c=({stepActive:s,headings:r})=>{const l=document.globals.globals;return t.jsx("div",{className:`acpt-steps ${l.is_rtl===!0?"rtl":""}`,children:r.map((n,d)=>t.jsx(a,{heading:n,index:d,stepActive:s}))})};c.propTypes={stepActive:e.number.isRequired,headings:e.arrayOf(e.shape({label:e.string.isRequired,description:e.string.isRequired})).isRequired};export{c as S,o as a};
