import { ReactNode } from "react";
import { NotificationRecord, NotificationRecord as NotificationRecord$1 } from "@platform-modules/notifications/inbox";
//#region src/client.d.ts
/**
 * Injected data seam for the browser. Every method targets the CURRENT user's
 * inbox — the consumer's route derives userId from the session, NEVER a param
 * (a browser-asserted userId would be an IDOR footgun).
 */
interface NotificationClient {
  list(opts?: {
    limit?: number;
    cursor?: string;
    unreadOnly?: boolean;
  }): Promise<{
    items: NotificationRecord[];
    nextCursor?: string;
  }>;
  unreadCount(): Promise<number>;
  markRead(ids: string[] | 'all'): Promise<void>;
}
//#endregion
//#region src/errors.d.ts
declare class NotificationClientError extends Error {
  readonly code: string;
  constructor(message: string, code?: string);
}
declare function isNotificationClientError(e: unknown): e is NotificationClientError;
//#endregion
//#region src/useNotifications.d.ts
declare function useNotifications(client: NotificationClient, opts?: {
  pollMs?: number;
}): {
  items: NotificationRecord$1[];
  unread: number;
  loading: boolean;
  error: Error | null;
  hasMore: boolean;
  loadMore: () => Promise<void>;
  markRead: (ids: string[] | "all") => Promise<void>;
  reload: () => void;
};
//#endregion
//#region src/NotificationBell.d.ts
interface NotificationBellProps {
  client: NotificationClient;
  onOpen?(): void;
}
declare function NotificationBell({ client, onOpen }: NotificationBellProps): import("react").JSX.Element;
//#endregion
//#region src/NotificationList.d.ts
interface NotificationListProps {
  client: NotificationClient;
  emptyState?: ReactNode;
}
declare function NotificationList({ client, emptyState }: NotificationListProps): import("react").JSX.Element;
//#endregion
export { NotificationBell, type NotificationClient, NotificationClientError, NotificationList, type NotificationRecord, isNotificationClientError, useNotifications };