import { icons } from './icons.js';
import { renderDashboard } from '../pages/DashboardPage.js';
import { renderFacturasPage } from '../pages/FacturasPage.js';
import { renderFacturasProveedoresPage } from '../pages/FacturasProveedoresPage.js';
import { renderCreateInvoicePage } from '../pages/CreateInvoicePage.js';
import { renderClientesPage } from '../pages/ClientesPage.js';
import { renderContactsPage } from '../pages/ContactsPage.js';
import { renderBancoPage } from '../pages/BancoPage.js';
import { renderSettingsPage } from '../pages/SettingsPage.js';

export const pagesConfig = [
  {
    _file: 'DashboardPage',
    route: 'dashboard',
    name: 'Dashboard',
    order: 1,
    icon: icons.dashboard,
    voicePatterns: ['dashboard', 'inicio', 'ir al inicio', 'ir al dashboard', 'resumen', 'home', 'panel', 'principal'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderDashboard,
  },
  {
    _file: 'FacturasPage',
    route: 'invoices',
    name: 'Facturas',
    order: 2,
    icon: icons.invoices,
    voicePatterns: ['facturas', 'ver facturas', 'ir a facturas', 'lista facturas', 'mis facturas', 'listado facturas'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderFacturasPage,
  },
  {
    _file: 'FacturasProveedoresPage',
    route: 'facturas-proveedores',
    name: 'Fact. Proveedores',
    order: 3,
    icon: icons.supplierInvoices,
    voicePatterns: ['facturas proveedores', 'proveedores', 'facturas de proveedor', 'compras'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderFacturasProveedoresPage,
  },
  {
    _file: 'CreateInvoicePage',
    route: 'create-invoice',
    name: 'Nueva Factura',
    order: 4,
    icon: icons.plus,
    voicePatterns: ['nueva factura', 'crear factura', 'factura nueva', 'añadir factura'],
    requiresAuth: true,
    showInSidebar: false,
    render: renderCreateInvoicePage,
  },
  {
    _file: 'ClientesPage',
    route: 'clients',
    name: 'Terceros',
    order: 5,
    icon: icons.clients,
    voicePatterns: ['terceros', 'ver terceros', 'ir a terceros', 'clientes', 'ver clientes'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderClientesPage,
  },
  {
    _file: 'ContactsPage',
    route: 'contacts',
    name: 'Contactos',
    order: 6,
    icon: icons.user,
    voicePatterns: ['contactos', 'ver contactos', 'ir a contactos', 'lista contactos'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderContactsPage,
  },
  {
    _file: 'BancoPage',
    route: 'banco',
    name: 'Banco',
    order: 7,
    icon: icons.bank,
    voicePatterns: ['banco', 'ir al banco', 'cuentas', 'cuentas bancarias', 'movimientos'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderBancoPage,
  },
  {
    _file: 'SettingsPage',
    route: 'settings',
    name: 'Configuración',
    order: 8,
    icon: icons.settings,
    voicePatterns: ['configuración', 'configuracion', 'ajustes', 'settings', 'preferencias'],
    requiresAuth: true,
    showInSidebar: true,
    render: renderSettingsPage,
  },
  { _file: 'LoginPage' },
];
