import { Notification, NotificationPreferences, NotificationChannel, NotificationType, NotificationStatus } from '@geenius/notifications/shared'; export { Notification, NotificationBatch, NotificationChannel, NotificationPreferences, NotificationStatus, NotificationType } from '@geenius/notifications/shared'; import { JSX } from 'react'; /** * @module EmptyNotifications * @package @geenius/notifications-react-css * @description Renders the empty-state used when there are no notifications to * display in the React vanilla CSS variant. */ /** * Props for the React CSS empty-state component. */ interface EmptyNotificationsProps { className?: string; } /** * Renders the empty notification state. * * @param props Optional style override for the empty-state container. * @returns The empty-state markup. */ declare function EmptyNotifications({ className, }: EmptyNotificationsProps): JSX.Element; /** * @module NotificationBell * @package @geenius/notifications-react-css * @description Renders the bell trigger used to open the notification panel in * the React vanilla CSS variant. */ /** * Props for the React CSS notification bell trigger. */ interface NotificationBellProps { unreadCount?: number; onClick?: () => void; isOpen?: boolean; ariaControls?: string; className?: string; } /** * Renders the bell button used to toggle the notification panel. * * @param props Bell props including unread count and optional open state. * @returns The bell trigger element. */ declare function NotificationBell({ unreadCount, onClick, isOpen, ariaControls, className, }: NotificationBellProps): JSX.Element; /** * @module NotificationItem * @package @geenius/notifications-react-css * @description Renders a single inbox row for the React vanilla CSS variant. */ /** * Props for a single notification row. */ interface NotificationItemProps { notification: Notification; onRead?: (id: string) => void; onDismiss?: (id: string) => void; className?: string; } /** * Renders a single notification row with optional read and dismiss actions. * * @param props Notification row props. * @returns The rendered notification row. */ declare function NotificationItem({ notification, onRead, onDismiss, className, }: NotificationItemProps): JSX.Element; /** * @module NotificationPanel * @package @geenius/notifications-react-css * @description Renders the compact notification drawer used by the React * vanilla CSS variant. */ /** * Props for the React CSS notification panel. */ interface NotificationPanelProps { notifications: Notification[]; onMarkAll?: () => void; onClose?: () => void; onRead?: (id: string) => void; onDismiss?: (id: string) => void; onViewAll?: () => void; panelId?: string; title?: string; className?: string; } /** * Renders the notification drawer panel. * * @param props Drawer props including notification data and action handlers. * @returns The drawer panel markup. */ declare function NotificationPanel({ notifications, onMarkAll, onClose, onRead, onDismiss, onViewAll, panelId, title, className, }: NotificationPanelProps): JSX.Element; /** * @module NotificationPreferencesForm * @package @geenius/notifications-react-css * @description Renders the shared preference controls for the React vanilla * CSS variant. */ /** * Async or sync handler used by the preferences form. */ type NotificationPreferencesFormUpdate = (channels?: Record, types?: Record, quietHours?: { start: string; end: string; }) => void | Promise; /** * Props for the React CSS preferences form. */ interface NotificationPreferencesFormProps { preferences: NotificationPreferences; onUpdate: NotificationPreferencesFormUpdate; className?: string; } /** * Renders the notification preferences form. * * @param props Preference data and update handler. * @returns The preference form markup. */ declare function NotificationPreferencesForm({ preferences, onUpdate, className, }: NotificationPreferencesFormProps): JSX.Element; /** * @module NotificationTypeBadge * @package @geenius/notifications-react-css * @description Renders a small semantic badge for a notification type in the * React vanilla CSS variant. */ /** * Props for the notification type badge. */ interface NotificationTypeBadgeProps { type: NotificationType; className?: string; } /** * Renders a semantic badge for a notification type. * * @param props Badge props. * @returns The rendered badge. */ declare function NotificationTypeBadge({ type, className, }: NotificationTypeBadgeProps): JSX.Element; /** * @module UseBellBadge * @package @geenius/notifications-react-css * @description Provides the compact badge state used by the bell trigger in * the React vanilla CSS notifications variant. */ /** * Bell badge state derived from the unread count. */ interface BellBadgeState { count: number; hasUnread: boolean; displayCount: string; } /** * Derives bell badge state from an unread count. * * @param unreadCount Current unread count. * @returns Derived badge state for rendering. */ declare function useBellBadge(unreadCount: number | undefined): BellBadgeState; /** * @module UseNotificationPreferences * @package @geenius/notifications-react-css * @description Wraps preference mutation flows for the React vanilla CSS * notifications variant. */ /** * Async preference update function consumed by the hook. */ type UpdateNotificationPreferences = (channels?: Record, types?: Record, quietHours?: { start: string; end: string; }) => Promise; /** * State returned by {@link useNotificationPreferences}. */ interface UseNotificationPreferencesResult { preferences: NotificationPreferences | null | undefined; isLoading: boolean; toggleChannel: (channel: NotificationChannel, enabled: boolean) => Promise; toggleType: (type: NotificationType, enabled: boolean) => Promise; setQuietHours: (start: string, end: string) => Promise; } /** * Manages async preference updates for the React CSS notifications package. * * @param preferences Preference document or loading state. * @param updatePreferences Optional async update function. * @returns Preference state plus helpers for toggles and quiet hours. */ declare function useNotificationPreferences(preferences: NotificationPreferences | null | undefined, updatePreferences?: UpdateNotificationPreferences): UseNotificationPreferencesResult; /** * @module UseNotificationPush * @package @geenius/notifications-react-css * @description Manages browser notification permissions and push subscription * requests for the React vanilla CSS notifications variant. */ /** * Push subscription state returned by {@link useNotificationPush}. */ interface UseNotificationPushResult { permission: NotificationPermission; subscription: PushSubscription | null; requestPermission: () => Promise; subscribe: (vapidPublicKey?: string) => Promise; } /** * Requests browser push permission and creates subscriptions when supported. * * @returns Current permission state plus permission/subscription helpers. */ declare function useNotificationPush(): UseNotificationPushResult; /** * @module UseNotifications * @package @geenius/notifications-react-css * @description Implements the primary inbox hook for the React vanilla CSS * notifications variant. */ /** * Async handlers supported by the inbox hook. */ interface NotificationActionHandlers { markRead: (id: string) => Promise; markAllRead: () => Promise; dismiss: (id: string) => Promise; deleteNotification: (id: string) => Promise; } /** * Shape returned by {@link useNotifications}. */ interface UseNotificationsResult { notifications: Notification[]; allNotifications: Notification[]; unreadCount: number; grouped: Map; statusFilter: NotificationStatus | 'all'; setStatusFilter: (status: NotificationStatus | 'all') => void; typeFilter: NotificationType | 'all'; setTypeFilter: (type: NotificationType | 'all') => void; isLoading: boolean; markRead?: NotificationActionHandlers['markRead']; markAllRead?: NotificationActionHandlers['markAllRead']; dismiss?: NotificationActionHandlers['dismiss']; deleteNotification?: NotificationActionHandlers['deleteNotification']; } /** * Computes derived inbox state for the React CSS notification views. * * @param notifications Source notification list, or `undefined` while loading. * @param actions Optional async mutation handlers for notification actions. * @returns Derived inbox state and mutation callbacks. */ declare function useNotifications(notifications: Notification[] | undefined, actions?: Partial): UseNotificationsResult; /** * @module NotificationPreferencesPage * @package @geenius/notifications-react-css * @description Renders the full-page notification preference settings screen * for the React vanilla CSS variant. */ /** * Props for the React CSS notification preferences page. */ interface NotificationPreferencesPageProps { preferences: NotificationPreferences | null | undefined; onUpdate?: (channels?: Record, types?: Record, quietHours?: { start: string; end: string; }) => Promise; className?: string; } /** * Renders the full-page notification preferences experience. * * @param props Page props containing current preferences and update callback. * @returns The preferences page markup. */ declare function NotificationPreferencesPage({ preferences: rawPreferences, onUpdate, className, }: NotificationPreferencesPageProps): JSX.Element; /** * @module NotificationsPage * @package @geenius/notifications-react-css * @description Renders the full inbox page for the React vanilla CSS variant. */ /** * Props for the React CSS notifications page. */ interface NotificationsPageProps { notifications: Notification[] | undefined; onMarkRead?: (id: string) => Promise; onMarkAllRead?: () => Promise; onDismiss?: (id: string) => Promise; onDelete?: (id: string) => Promise; className?: string; } /** * Renders the full notifications inbox. * * @param props Page props including notification data and mutation handlers. * @returns The notifications page markup. */ declare function NotificationsPage({ notifications: rawNotifications, onMarkRead, onMarkAllRead, onDismiss, onDelete, className, }: NotificationsPageProps): JSX.Element; export { EmptyNotifications, NotificationBell, NotificationItem, NotificationPanel, NotificationPreferencesForm, NotificationPreferencesPage, NotificationTypeBadge, NotificationsPage, useBellBadge, useNotificationPreferences, useNotificationPush, useNotifications };