import { Notification, NotificationPreferences, NotificationChannel, NotificationType, NotificationStatus } from '@geenius/notifications/shared'; export { Notification, NotificationBatch, NotificationChannel, NotificationPreferences, NotificationStatus, NotificationType } from '@geenius/notifications/shared'; import { JSX, Accessor, Setter } from 'solid-js'; /** * @module EmptyNotifications * @package @geenius/notifications-solidjs-css * @description Renders the empty-state used when there are no notifications to * display in the SolidJS vanilla CSS variant. */ /** * Props for the SolidJS CSS empty-state component. */ interface EmptyNotificationsProps { class?: string; } /** * Renders the empty notification state. * * @param props Optional style override for the empty-state container. * @returns The empty-state markup. */ declare function EmptyNotifications(props: EmptyNotificationsProps): JSX.Element; /** * @module NotificationBell * @package @geenius/notifications-solidjs-css * @description Renders the bell trigger used to open the notification panel in * the SolidJS vanilla CSS variant. */ /** * Props for the SolidJS CSS notification bell trigger. */ interface NotificationBellProps { unreadCount?: number; onClick?: () => void; isOpen?: boolean; ariaControls?: string; class?: 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(props: NotificationBellProps): JSX.Element; /** * @module NotificationItem * @package @geenius/notifications-solidjs-css * @description Renders a single inbox row for the SolidJS vanilla CSS * variant. */ /** * Props for a single notification row. */ interface NotificationItemProps { notification: Notification; onRead?: (id: string) => void; onDismiss?: (id: string) => void; class?: 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(props: NotificationItemProps): JSX.Element; /** * @module NotificationPanel * @package @geenius/notifications-solidjs-css * @description Renders the compact notification drawer used by the SolidJS * vanilla CSS variant. */ /** * Props for the SolidJS 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; class?: string; } /** * Renders the notification drawer panel. * * @param props Drawer props including notification data and action handlers. * @returns The drawer panel markup. */ declare function NotificationPanel(props: NotificationPanelProps): JSX.Element; /** * @module NotificationPreferencesForm * @package @geenius/notifications-solidjs-css * @description Renders the shared preference controls for the SolidJS 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 SolidJS CSS preferences form. */ interface NotificationPreferencesFormProps { preferences: NotificationPreferences; onUpdate: NotificationPreferencesFormUpdate; class?: string; } /** * Renders the notification preferences form. * * @param props Preference data and update handler. * @returns The preference form markup. */ declare function NotificationPreferencesForm(props: NotificationPreferencesFormProps): JSX.Element; /** * @module NotificationTypeBadge * @package @geenius/notifications-solidjs-css * @description Renders a small semantic badge for a notification type in the * SolidJS vanilla CSS variant. */ /** * Props for the notification type badge. */ interface NotificationTypeBadgeProps { type: NotificationType; class?: string; } /** * Renders a semantic badge for a notification type. * * @param props Badge props. * @returns The rendered badge. */ declare function NotificationTypeBadge(props: NotificationTypeBadgeProps): JSX.Element; /** * @module NotificationPreferencesPage * @package @geenius/notifications-solidjs-css * @description Renders the full-page notification preference settings screen * for the SolidJS vanilla CSS variant. */ /** * Props for the SolidJS CSS notification preferences page. */ interface NotificationPreferencesPageProps { preferences: NotificationPreferences | null | undefined; onUpdate?: (channels?: Record, types?: Record, quietHours?: { start: string; end: string; }) => Promise; class?: 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(props: NotificationPreferencesPageProps): JSX.Element; /** * @module NotificationsPage * @package @geenius/notifications-solidjs-css * @description Renders the full inbox page for the SolidJS vanilla CSS * variant. */ /** * Props for the SolidJS CSS notifications page. */ interface NotificationsPageProps { notifications: Notification[] | undefined; onMarkRead?: (id: string) => Promise; onMarkAllRead?: () => Promise; onDismiss?: (id: string) => Promise; onDelete?: (id: string) => Promise; class?: string; } /** * Renders the full notifications inbox. * * @param props Page props including notification data and mutation handlers. * @returns The notifications page markup. */ declare function NotificationsPage(props: NotificationsPageProps): JSX.Element; /** * @module CreateBellBadge * @package @geenius/notifications-solidjs-css * @description Provides the compact bell badge state used by the bell trigger * in the SolidJS vanilla CSS notifications variant. */ /** * Bell badge state derived from the unread count. */ interface BellBadgeState { count: Accessor; hasUnread: Accessor; displayCount: Accessor; } /** * Derives bell badge state from an unread count accessor. * * @param unreadCount Current unread count accessor. * @returns Derived badge state for rendering. */ declare function createBellBadge(unreadCount: Accessor): BellBadgeState; /** * @module CreateNotificationPreferences * @package @geenius/notifications-solidjs-css * @description Wraps preference mutation flows for the SolidJS vanilla CSS * notifications variant. */ /** * Async preference update function consumed by the primitive. */ type UpdateNotificationPreferences = (channels?: Record, types?: Record, quietHours?: { start: string; end: string; }) => Promise; /** * State returned by {@link createNotificationPreferences}. */ interface CreateNotificationPreferencesResult { preferences: Accessor; isLoading: Accessor; toggleChannel: (channel: NotificationChannel, enabled: boolean) => Promise; toggleType: (type: NotificationType, enabled: boolean) => Promise; setQuietHours: (start: string, end: string) => Promise; } /** * Manages async preference updates for the SolidJS CSS notifications package. * * @param preferences Preference accessor or loading state. * @param updatePreferences Optional async update function. * @returns Preference state plus helpers for toggles and quiet hours. */ declare function createNotificationPreferences(preferences: Accessor, updatePreferences?: UpdateNotificationPreferences): CreateNotificationPreferencesResult; /** * @module CreateNotificationPush * @package @geenius/notifications-solidjs-css * @description Manages browser notification permissions and push subscription * requests for the SolidJS vanilla CSS notifications variant. */ /** * Push subscription state returned by {@link createNotificationPush}. */ interface CreateNotificationPushResult { permission: Accessor; subscription: Accessor; 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 createNotificationPush(): CreateNotificationPushResult; /** * @module CreateNotifications * @package @geenius/notifications-solidjs-css * @description Implements the primary inbox primitive for the SolidJS vanilla * CSS notifications variant. */ /** * Async handlers supported by the inbox primitive. */ interface NotificationActionHandlers { markRead: (id: string) => Promise; markAllRead: () => Promise; dismiss: (id: string) => Promise; deleteNotification: (id: string) => Promise; } /** * Shape returned by {@link createNotifications}. */ interface CreateNotificationsResult { notifications: Accessor; allNotifications: Accessor; unreadCount: Accessor; grouped: Accessor>; statusFilter: Accessor; setStatusFilter: Setter; typeFilter: Accessor; setTypeFilter: Setter; isLoading: Accessor; markRead?: NotificationActionHandlers['markRead']; markAllRead?: NotificationActionHandlers['markAllRead']; dismiss?: NotificationActionHandlers['dismiss']; deleteNotification?: NotificationActionHandlers['deleteNotification']; } /** * Computes derived inbox state for the SolidJS CSS notification views. * * @param notifications Source notification accessor, or `undefined` while loading. * @param actions Optional async mutation handlers for notification actions. * @returns Derived inbox state and mutation callbacks. */ declare function createNotifications(notifications: Accessor, actions?: Partial): CreateNotificationsResult; export { EmptyNotifications, NotificationBell, NotificationItem, NotificationPanel, NotificationPreferencesForm, NotificationPreferencesPage, NotificationTypeBadge, NotificationsPage, createBellBadge, createNotificationPreferences, createNotificationPush, createNotifications };