import { createContext } from 'react';
import type { INotification } from '../types';

export interface NotificationContextData {
    notifications: INotification[];
    unreadCount: number;
    loading: boolean;
    markAsRead: (id: string) => Promise<void>;
    markAllAsRead: () => Promise<void>;
    clearAll: () => Promise<void>;
    archiveNotification: (id: string) => Promise<void>;
    deleteNotification: (id: string) => Promise<void>;
    fetchNotifications: () => Promise<void>;
}

export const NotificationContext = createContext<NotificationContextData>({} as NotificationContextData);
