import { cn } from '@/lib/utils';
import { formatPrice } from '@/lib/utils';

interface PriceTagProps {
  minor: number;
  locale: string;
  currency?: string;
  prefix?: string;
  className?: string;
}

export function PriceTag({ minor, locale, currency = 'EGP', prefix, className }: PriceTagProps) {
  return (
    <span className={cn('tabular-nums', className)}>
      {prefix && <span className="me-1">{prefix}</span>}
      {formatPrice(minor, locale, currency)}
    </span>
  );
}
