import 'package:flutter/material.dart'; enum TipoNotificacion { pedidoConfirmado, pedidoEntregado, paradaProxima, stockBajo, metaVentas, recordatorio, alerta, } extension TipoNotificacionExt on TipoNotificacion { String get label { switch (this) { case TipoNotificacion.pedidoConfirmado: return 'Pedido confirmado'; case TipoNotificacion.pedidoEntregado: return 'Pedido entregado'; case TipoNotificacion.paradaProxima: return 'Próxima parada'; case TipoNotificacion.stockBajo: return 'Stock bajo'; case TipoNotificacion.metaVentas: return 'Meta de ventas'; case TipoNotificacion.recordatorio: return 'Recordatorio'; case TipoNotificacion.alerta: return 'Alerta'; } } IconData get icono { switch (this) { case TipoNotificacion.pedidoConfirmado: return Icons.receipt_long; case TipoNotificacion.pedidoEntregado: return Icons.local_shipping; case TipoNotificacion.paradaProxima: return Icons.location_on; case TipoNotificacion.stockBajo: return Icons.inventory_2; case TipoNotificacion.metaVentas: return Icons.trending_up; case TipoNotificacion.recordatorio: return Icons.alarm; case TipoNotificacion.alerta: return Icons.warning_amber; } } Color get color { switch (this) { case TipoNotificacion.pedidoConfirmado: return const Color(0xFF16A34A); case TipoNotificacion.pedidoEntregado: return const Color(0xFF0891B2); case TipoNotificacion.paradaProxima: return const Color(0xFF2563EB); case TipoNotificacion.stockBajo: return const Color(0xFFD97706); case TipoNotificacion.metaVentas: return const Color(0xFF7C3AED); case TipoNotificacion.recordatorio: return const Color(0xFF0891B2); case TipoNotificacion.alerta: return const Color(0xFFDC2626); } } } class Notificacion { final String id; final TipoNotificacion tipo; final String titulo; final String cuerpo; final DateTime fecha; bool leida; final String? accionId; Notificacion({ required this.id, required this.tipo, required this.titulo, required this.cuerpo, required this.fecha, this.leida = false, this.accionId, }); }