import { Truck } from "lucide-react"; import { Progress } from "@/components/ui/progress"; import { cn } from "@/lib/utils"; interface PromoBanner1Props { threshold?: number; currentAmount?: number; currency?: string; className?: string; } const formatPrice = (price: number, currency = "IRR") => new Intl.NumberFormat("fa-IR", { style: "currency", currency, }).format(price); const PromoBanner1 = ({ threshold = 75, currentAmount = 45, currency = "IRR", className, }: PromoBanner1Props) => { const progress = Math.min((currentAmount / threshold) * 100, 100); const remaining = threshold - currentAmount; const hasQualified = remaining <= 0; return (
ارسال رایگان برای سفارش شما فعال شد!
) : (فقط{" "} {formatPrice(remaining, currency)} {" "} تا ارسال رایگان