import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";
import { PERSIAN_MONTHS } from "@/constants";

export default function PersianMonthDropdown({
  value,
  onChange,
}: {
  value: number;
  onChange: (month: number) => void;
}) {
  return (
    <Select value={String(value)} onValueChange={(v) => onChange(Number(v))}>
      <SelectTrigger className="w-[130px]">
        <SelectValue />
      </SelectTrigger>

      <SelectContent>
        {PERSIAN_MONTHS.map((month, index) => (
          <SelectItem key={index} value={String(index)}>
            {month}
          </SelectItem>
        ))}
      </SelectContent>
    </Select>
  );
}
