/**
 * Shared React contexts for PixieSprout.
 */
import { createContext } from 'react';

export interface NotificationCenterContextValue {
  unreadCount: number;
  openNotificationCenter: () => void;
}

export interface SettingsContextValue {
  openSettings: () => void;
}

const noop = (): void => undefined;

export const NotificationCenterContext = createContext<NotificationCenterContextValue>({
  unreadCount: 0,
  openNotificationCenter: noop,
});

export const SettingsContext = createContext<SettingsContextValue>({
  openSettings: noop,
});

NotificationCenterContext.displayName = 'NotificationCenterContext';
SettingsContext.displayName = 'SettingsContext';
