"use client";

import { useTranslation } from "@turbostarter/i18n";
import { cn } from "@turbostarter/ui";

interface StepIndicatorProps {
  currentStep: number;
  totalSteps: number;
}

export const StepIndicator = ({
  currentStep,
  totalSteps,
}: StepIndicatorProps) => {
  const { t } = useTranslation("marketing");

  return (
    <div className="flex w-full max-w-md flex-col items-center gap-3">
      <p className="text-muted-foreground text-sm">
        {t("wizard.step", { current: currentStep, total: totalSteps })}
      </p>
      <div className="flex w-full gap-2">
        {Array.from({ length: totalSteps }, (_, i) => (
          <div
            key={i}
            className={cn(
              "h-1.5 flex-1 rounded-full transition-colors",
              i < currentStep ? "bg-primary" : "bg-muted",
            )}
          />
        ))}
      </div>
    </div>
  );
};
