<?php

/*
|--------------------------------------------------------------------------
| Catálogo de módulos del SaaS
|--------------------------------------------------------------------------
|
| Single source of truth de todos los módulos activables/desactivables del
| sistema. Esta lista se sincroniza a la tabla `modules` vía seeder y se
| usa en el middleware `module:<key>` para gatear acceso.
|
*/

return [
    'modules' => [

        // Núcleo del producto (también administrables por plan)
        'bookings'           => ['name' => 'Reservas',                'group' => 'core',          'core' => true],
        'customers'          => ['name' => 'Clientes',                'group' => 'core',          'core' => true],
        'employees'          => ['name' => 'Empleados',               'group' => 'core',          'core' => true],
        'services'           => ['name' => 'Servicios',               'group' => 'core',          'core' => true],
        'schedules'          => ['name' => 'Horarios',                'group' => 'core',          'core' => true],
        'public_page'        => ['name' => 'Página Pública',          'group' => 'core',          'core' => true],

        // Funcionalidad estándar
        'reports'            => ['name' => 'Reportes',                'group' => 'analytics',     'core' => false],
        'promotions'         => ['name' => 'Promociones',             'group' => 'marketing',     'core' => false],
        'coupons'            => ['name' => 'Cupones',                 'group' => 'marketing',     'core' => false],
        'gallery'            => ['name' => 'Galería',                 'group' => 'marketing',     'core' => false],
        'reminders'          => ['name' => 'Recordatorios',           'group' => 'communications','core' => false],
        'notifications'      => ['name' => 'Notificaciones por correo','group' => 'communications','core' => false],
        'whatsapp'           => ['name' => 'WhatsApp',                'group' => 'communications','core' => false],

        // Funcionalidad avanzada
        'cash_register'      => ['name' => 'Caja / Administrativo',   'group' => 'billing',       'core' => false],
        'payments'           => ['name' => 'Pagos en línea',          'group' => 'billing',       'core' => false],
        'invoicing'          => ['name' => 'Facturación',             'group' => 'billing',       'core' => false],
        'multi_branch'       => ['name' => 'Múltiples sedes',         'group' => 'enterprise',    'core' => false],
        'pwa'                => ['name' => 'PWA',                     'group' => 'enterprise',    'core' => false],
        'branding'           => ['name' => 'Personalización visual',  'group' => 'enterprise',    'core' => false],
        'advanced_agenda'    => ['name' => 'Agenda avanzada',         'group' => 'enterprise',    'core' => false],

        // Vertical especializado
        'clinical_history'   => ['name' => 'Historial clínico/ficha', 'group' => 'clinical',      'core' => false],
        'consent_forms'      => ['name' => 'Consentimientos digitales','group' => 'clinical',     'core' => false],
        'client_files'       => ['name' => 'Archivos del cliente',    'group' => 'clinical',      'core' => false],
    ],

    'groups' => [
        'core'           => 'Núcleo',
        'analytics'      => 'Analítica',
        'marketing'      => 'Marketing',
        'communications' => 'Comunicaciones',
        'billing'        => 'Facturación y Pagos',
        'enterprise'     => 'Empresarial',
        'clinical'       => 'Historial Clínico',
    ],
];
