import { NotificationOpenResult } from '../../../services/auth/notification-action.service'; import { NotificationDocument } from '../../../services/firebase/notifications.service'; /** * Configuración acotada de `val-notifications-view` (object-first). Tres ejes de * variación permitidos — **NADA de slots arbitrarios** (ADR-021: una vista * full-feature no abre slots; si falta algo, se promueve un nuevo punto de * extensión): * * - **secciones / flags** — gatean el render de bloques opcionales (CTA de push * desactivado, botón "Marcar todas como leídas") y la ruta de configuración de * notificaciones a la que apuntan los CTA. * - **branding** — `i18nNamespace` para resolver los textos (default * `'Notifications'`). * - **comportamiento / callbacks** — `onNotificationOpen` (telemetría tras abrir * una notif), tamaño de página y tope de fetch. */ export interface NotificationsViewConfig { /** * Muestra la card "Activa las notificaciones push" cuando el permiso del * navegador no está concedido. Default `true`. */ showPushOffCta?: boolean; /** * Habilita el botón "Marcar todas como leídas" (visible solo si hay notifs sin * leer). Default `true`. */ enableMarkAll?: boolean; /** * Ruta de configuración de notificaciones a la que navegan los CTA ("Activar * notificaciones" / "Ir a configuración"). Default `'/app/settings/notifications'`. */ settingsNotificationsPath?: string; /** * Namespace i18n con el que la vista resuelve sus textos. * Default `'Notifications'`. */ i18nNamespace?: string; /** * Hook de telemetría tras abrir una notificación (markRead + switch-org + * navegar/handoff cross-app). `result` es lo que devuelve * `NotificationActionService.open(notif)`. */ onNotificationOpen?: (notif: NotificationDocument, result: NotificationOpenResult) => void; /** * Cuántas notifs se revelan al inicio y por cada "cargar más". Default `10`. */ pageSize?: number; /** * Tope de docs que carga el stream real-time (`getAll(maxLoad)`). Default `50`. */ maxLoad?: number; }