"use client" import { cn, convertToArabicNumerals } from "@/lib/utils" import type { StepItemProps, StepProps } from "@/types/components" import { useLocale } from "next-intl" import { Children, type PropsWithChildren } from "react" export function Step({ children, className }: PropsWithChildren) { const length = Children.count(children) const locale = useLocale() return (
{Children.map(children, (child, index) => (
{index < length - 1 && ( )} {locale === "ar" ? convertToArabicNumerals(index + 1) : (index + 1).toString()}
{child}
))}
) } export function StepItem({ children, title, className }: StepItemProps) { return (
{title &&

{title}

}
{children}
) }