import { Badge } from '@/components/ui/badge';
import type { ListingStatus } from '@/lib/listings-api';
import { LISTING_STATUSES } from '@/lib/validations/listings';

interface ListingStatusBadgeProps {
  status: ListingStatus;
}

export function ListingStatusBadge({ status }: ListingStatusBadgeProps) {
  const config = LISTING_STATUSES[status] ?? { label: status, variant: 'outline' as const };
  return <Badge variant={config.variant}>{config.label}</Badge>;
}
