---
interface Props {
count?: number
/** Step labels; overrides `count` when provided. */
labels?: string[]
active?: number
color?: string
class?: string
id?: string
/** aria-label attribute of the
. */
ariaLabel?: string
}
const { count: countProp = 3, labels: labelsProp, active = 1, color = 'primary', class: className, id, ariaLabel } = Astro.props
const labels = labelsProp ?? []
const count = labelsProp ? labels.length : countProp
const steps = Array.from({ length: count }, (_, i) => ({
index: i + 1,
label: labels[i] || `Step ${i + 1}`,
}))
---
{
steps.map((step) => (
-
{step.label}
))
}