"use client"; import type { PaymentMethod } from "@/lib/saleor/payments/types"; import { PaymentMethodCard } from "./PaymentMethodCard"; import { useTranslations } from "next-intl"; interface PaymentMethodSelectorProps { methods: PaymentMethod[]; selectedMethodId: string; onSelectMethod: (methodId: string) => void; locale: string; disabled?: boolean; } export function PaymentMethodSelector({ methods, selectedMethodId, onSelectMethod, locale, disabled = false, }: PaymentMethodSelectorProps) { const t = useTranslations("Payment"); // Filter to only available methods const availableMethods = methods.filter((m) => m.available); if (availableMethods.length === 0) { return (
{t("singleMethodNotice")}
)}