import type { LotStatus } from '@/types/portal';

export const lotStatus: Record<
    LotStatus,
    { label: string; color: string; surface: string }
> = {
    available: {
        label: 'Disponible',
        color: '#f4f1e8',
        surface: 'bg-[#e6f2e9] text-[#286044]',
    },
    held: {
        label: 'Apartado',
        color: '#6eabb2',
        surface: 'bg-[#fff0d7] text-[#8b5a18]',
    },
    sold: {
        label: 'Vendido',
        color: '#c97875',
        surface: 'bg-[#f5e4e2] text-[#874a47]',
    },
    blocked: {
        label: 'Bloqueado',
        color: '#b75d4b',
        surface: 'bg-[#f7e5e1] text-[#8a3f32]',
    },
};

export const formatMoney = (value: number): string =>
    new Intl.NumberFormat('es-MX', {
        style: 'currency',
        currency: 'MXN',
        maximumFractionDigits: 0,
    }).format(value);
