export type ReadSource = 'manual' | 'outbox_send' | 'all_replied';

export interface MarkReadInput {
  readonly deviceId: string;
  readonly handle: string;
  /** Mark read through this instant (ISO). Defaults to "now" at the repo layer. */
  readonly readThrough?: string | null;
  readonly source?: ReadSource;
}

/** The read-state of one handle, with whether it currently has unread inbound. */
export interface ConversationReadState {
  readonly handle: string;
  readonly readThrough: string | null;
  readonly readAt: string | null;
  readonly source: ReadSource | null;
  readonly lastInboundAt: string | null;
  /** true when there is inbound newer than `read_through` (or never marked read). */
  readonly unread: boolean;
}
