import React from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Bell, CheckCircle, XCircle, X } from 'lucide-react'; import { useSugestoes, SugestaoNotification } from '@/hooks/useSugestoes'; import { format, parseISO } from 'date-fns'; import { ptBR } from 'date-fns/locale'; const NotificationsSugestoes: React.FC = () => { const { notifications, markNotificationAsRead } = useSugestoes(); if (notifications.length === 0) { return null; } const getNotificationIcon = (message: string) => { if (message.includes('implementada')) { return ; } if (message.includes('rejeitada')) { return ; } return ; }; const getNotificationColor = (message: string) => { if (message.includes('implementada')) { return 'bg-green-900/10 border-green-400/20'; } if (message.includes('rejeitada')) { return 'bg-red-900/10 border-red-400/20'; } return 'bg-blue-900/10 border-blue-400/20'; }; return ( Notificações de Sugestões {notifications.length} {notifications.map((notification) => (
{getNotificationIcon(notification.message)}

{notification.message}

{format(parseISO(notification.created_at), 'dd/MM/yyyy HH:mm', { locale: ptBR })}

))}
); }; export default NotificationsSugestoes;