// Valdebebas Life — categorías y datos base
const DAY = 86400000;
const NOW = Date.now();

const VB_SERVICE_CATS = [
  { id: "manitas", label: "Manitas", icon: "handyman" },
  { id: "fontaneria", label: "Fontanería", icon: "plumbing" },
  { id: "electricidad", label: "Electricidad", icon: "electrical_services" },
  { id: "limpieza", label: "Limpieza", icon: "cleaning_services" },
  { id: "clases", label: "Clases particulares", icon: "school" },
  { id: "canguros", label: "Canguros", icon: "child_care" },
  { id: "mascotas", label: "Mascotas", icon: "pets" },
  { id: "reformas", label: "Reformas y pintura", icon: "format_paint" },
  { id: "mudanzas", label: "Mudanzas", icon: "local_shipping" },
  { id: "salud", label: "Fisio y salud", icon: "healing" },
  { id: "gestoria", label: "Gestoría", icon: "description" },
  { id: "informatica", label: "Informática", icon: "computer" },
];

const VB_BEST_CATS = [
  { id: "restaurante", label: "Restaurante", title: "El mejor restaurante", icon: "restaurant" },
  { id: "cafe", label: "Café", title: "El mejor café", icon: "local_cafe" },
  { id: "panaderia", label: "Panadería", title: "La mejor panadería", icon: "bakery_dining" },
  { id: "brunch", label: "Brunch", title: "El mejor brunch", icon: "brunch_dining" },
  { id: "pizza", label: "Pizza", title: "La mejor pizza", icon: "local_pizza" },
  { id: "hamburguesa", label: "Hamburguesa", title: "La mejor hamburguesa", icon: "lunch_dining" },
  { id: "terraza", label: "Terraza", title: "La mejor terraza", icon: "deck" },
  { id: "helado", label: "Heladería", title: "El mejor helado", icon: "icecream" },
];

// Directorio: lo gestiona el panel de administración (localStorage "vr3_dir" → luego tabla "directorio")
const vbDir = () => (window.__dir || []).filter(x => x.status === "activo");
const vbPros = () => vbDir().filter(x => x.kind === "pro");
const vbPlaces = () => vbDir().filter(x => x.kind === "place");

const VB_POST_TYPES = [
  { id: "empleo", label: "Ofertas de empleo", short: "Empleo", icon: "work", tone: "sky" },
  { id: "ayuda", label: "Pido ayuda", short: "Pido ayuda", icon: "front_hand", tone: "lime" },
  { id: "ofrezco", label: "Me ofrezco", short: "Me ofrezco", icon: "volunteer_activism", tone: "green" },
  { id: "venta", label: "Compro / vendo / regalo", short: "Compraventa", icon: "sell", tone: "sand" },
  { id: "perdido", label: "Objetos Perdidos", short: "Objetos Perdidos", icon: "search", tone: "coral" },
];

const VB_POSTS_SEED = [];

const VB_NEWS_CATS = ["Aviso", "Obras", "Transporte", "Eventos", "Comercio", "Comunidad"];
const VB_NEWS_ICONS = { Aviso: "campaign", Obras: "construction", Transporte: "directions_bus", Eventos: "celebration", Comercio: "storefront", Comunidad: "diversity_3" };


const VB_STREETS = ["Avda. de las Fuerzas Armadas", "Calle Antonio Gala", "Calle Catalina Suárez", "Calle Aurora Pavón", "Bulevar central", "Zona Parque Felipe VI", "Otra calle de Valdebebas", "Trabajo en Valdebebas (no vivo)"];

Object.assign(window, { VB_SERVICE_CATS, VB_BEST_CATS, vbDir, vbPros, vbPlaces, VB_POST_TYPES, VB_POSTS_SEED, VB_NEWS_CATS, VB_NEWS_ICONS, VB_STREETS, VB_DAY: DAY });
