"use client"; import useNotifications from "@/hooks/useNotifications"; import { Trash2, AlertTriangle } from "lucide-react"; import { useState } from "react"; interface DeleteNotificationProps { notificationId: number; onNotificationDeleted?: () => void; onError?: (message: string) => void; onSuccess?: (message: string) => void; } export default function DeleteNotification({ notificationId, onNotificationDeleted, onError, onSuccess }: DeleteNotificationProps) { const { deleteNotification } = useNotifications(); const handleDelete = async () => { const response = deleteNotification(notificationId); if (typeof response === "string") { onError && onError(response) return } try { const successMessage = await response if (onNotificationDeleted && successMessage) { onNotificationDeleted() onSuccess && onSuccess(successMessage) } } catch (apiError: any) { onError && onError(apiError) } } return (