// ─────────────────────────────────────────────────────
// DATA — static labels/colors only. Records hydrate from API.
// Mocks removed in Phase 0; modules fetch from /api/* in later phases.
// ─────────────────────────────────────────────────────

const VENDEDORES = [
  { code: 'KURTEN',  color: '#3a4048' },
  { code: 'FRAN',    color: '#1f6e92' },
  { code: 'JAVIER',  color: '#15803d' },
  { code: 'JOSE',    color: '#b45309' },
  { code: 'MIGUEL',  color: '#7c3aed' },
  { code: 'VICTOR',  color: '#be185d' },
];

const ORIGENES = ['FORM WEB','GOOGLEADS','WHATSAPP','TLF','META','PROPIA','BOCA BOCA','EMAIL'];

const ESTADOS_LEAD = {
  'PDTE_DATOS':       { label: 'Pdte. datos',       cls: 'warn' },
  'PDTE_PRESUPUESTO': { label: 'Pdte. presupuesto', cls: 'warn' },
  'PDTE_VISITA':      { label: 'Pdte. visita',      cls: 'warn' },
  'PDTE_LLAMAR':      { label: 'Pdte. llamar',      cls: 'warn' },
  'ENVIADO':          { label: 'Enviado',           cls: 'info' },
  'ACEPTADO':         { label: 'Aceptado',          cls: 'ok'   },
  'SIN_INTERES':      { label: 'Sin interés',       cls: 'err'  },
  'INFO_CURIOSIDAD':  { label: 'Solo info',         cls: ''     },
  'TELEFONO_ERRONEO': { label: 'Tel. erróneo',      cls: 'err'  },
};

const PRODUCTOS = [
  { id:'cortina',   name:'Cortina de cristal',   img:'/productos/cortina_cristal.png' },
  { id:'corredera', name:'Corredera de cristal', img:'/productos/corredera_cristal.png' },
  { id:'plegable',  name:'Plegable de cristal',  img:'/productos/plegable_cristal.png' },
  { id:'pergola',   name:'Pérgola bioclimática', img:'/productos/pergola_bio.png' },
  { id:'retract',   name:'Pérgola retráctil',    img:'/productos/pergola_retractil.jpg' },
  { id:'techo_f',   name:'Techo fijo',           img:'/productos/techo_fijo.png' },
  { id:'techo_m',   name:'Techo móvil',          img:'/productos/techo_movil.png' },
];

const ESTADOS_OC = {
  PENDIENTE:        { label:'Pendiente',       cls:'warn' },
  CONFIRMADA:       { label:'Confirmada',      cls:'info' },
  EN_TRANSITO:      { label:'En tránsito',     cls:'glass' },
  RECIBIDA_PARCIAL: { label:'Recib. parcial',  cls:'warn' },
  RECIBIDA:         { label:'Recibida',        cls:'ok'   },
  CANCELADA:        { label:'Cancelada',       cls:'err'  },
};

const ESTADOS_PROD = {
  PROCESANDO:            { label:'Procesando',         cls:'info' },
  PARCIAL:               { label:'Parcial',            cls:'warn' },
  LISTO_PARA_PRODUCCION: { label:'Listo para producción', cls:'ok' },
  COMPLETADO:            { label:'Completado',         cls:'ok'   },
  PDTE_MED:              { label:'Pdte. medición',     cls:'warn' },
};

// Live-hydrated stores. Populated by per-view loaders.
window.DATA = {
  VENDEDORES, ORIGENES, ESTADOS_LEAD, ESTADOS_OC, ESTADOS_PROD, PRODUCTOS,
  LEADS: [], COMPRAS: [], ORDENES_COMPRA: [], PARTES_LIVE: [], PARTES_HIST: [],
};
