import { N as MessageReceipt, R as RenderedMessageBatch, k as LiveMessageState } from "./types-CPrjYzuc.js"; //#region src/channels/message/live.d.ts type LivePreviewFinalizerDraft = { flush: () => Promise; id: () => TId | undefined; seal?: () => Promise; discardPending?: () => Promise; clear: () => Promise; }; type LivePreviewFinalizerResultKind = "normal-delivered" | "normal-skipped" | "preview-finalized" | "preview-retained"; type LivePreviewFinalizerResult = { kind: LivePreviewFinalizerResultKind; liveState?: LiveMessageState; }; type FinalizableLivePreviewAdapter = { draft?: LivePreviewFinalizerDraft; buildFinalEdit: (payload: TPayload) => TEdit | undefined; editFinal: (id: TId, edit: TEdit) => Promise; resolveFinalizedId?: (id: TId, edit: TEdit) => TId | undefined; createPreviewReceipt?: (id: TId, edit: TEdit) => MessageReceipt; onPreviewFinalized?: (id: TId, receipt: MessageReceipt, liveState: LiveMessageState) => Promise | void; buildSupplementalPayload?: (payload: TPayload) => TPayload | undefined; deliverSupplemental?: (payload: TPayload) => Promise; handlePreviewEditError?: (params: { error: unknown; id: TId; edit: TEdit; payload: TPayload; liveState: LiveMessageState; }) => "fallback" | "retain" | Promise<"fallback" | "retain">; logPreviewEditFailure?: (error: unknown) => void; }; declare function defineFinalizableLivePreviewAdapter(adapter: FinalizableLivePreviewAdapter): FinalizableLivePreviewAdapter; declare function createLiveMessageState(params?: { receipt?: MessageReceipt; lastRendered?: RenderedMessageBatch; canFinalizeInPlace?: boolean; }): LiveMessageState; declare function markLiveMessageFinalized(state: LiveMessageState, receipt: MessageReceipt): LiveMessageState; declare function createPreviewMessageReceipt(params: { id: unknown; threadId?: string; replyToId?: string; sentAt?: number; raw?: unknown; }): MessageReceipt; declare function deliverFinalizableLivePreview(params: { kind: "tool" | "block" | "final"; payload: TPayload; liveState?: LiveMessageState; draft?: LivePreviewFinalizerDraft; buildFinalEdit: (payload: TPayload) => TEdit | undefined; editFinal: (id: TId, edit: TEdit) => Promise; resolveFinalizedId?: (id: TId, edit: TEdit) => TId | undefined; deliverNormally: (payload: TPayload) => Promise; createPreviewReceipt?: (id: TId, edit: TEdit) => MessageReceipt; onPreviewFinalized?: (id: TId, receipt: MessageReceipt, liveState: LiveMessageState) => Promise | void; buildSupplementalPayload?: (payload: TPayload) => TPayload | undefined; deliverSupplemental?: (payload: TPayload) => Promise; handlePreviewEditError?: (params: { error: unknown; id: TId; edit: TEdit; payload: TPayload; liveState: LiveMessageState; }) => "fallback" | "retain" | Promise<"fallback" | "retain">; onNormalDelivered?: () => Promise | void; logPreviewEditFailure?: (error: unknown) => void; }): Promise>; declare function deliverWithFinalizableLivePreviewAdapter(params: { kind: "tool" | "block" | "final"; payload: TPayload; liveState?: LiveMessageState; adapter?: FinalizableLivePreviewAdapter; deliverNormally: (payload: TPayload) => Promise; onNormalDelivered?: () => Promise | void; }): Promise>; declare function markLiveMessagePreviewUpdated(state: LiveMessageState, rendered: RenderedMessageBatch): LiveMessageState; declare function markLiveMessageCancelled(state: LiveMessageState): LiveMessageState; //#endregion export { createLiveMessageState as a, deliverFinalizableLivePreview as c, markLiveMessageFinalized as d, markLiveMessagePreviewUpdated as f, LivePreviewFinalizerResultKind as i, deliverWithFinalizableLivePreviewAdapter as l, LivePreviewFinalizerDraft as n, createPreviewMessageReceipt as o, LivePreviewFinalizerResult as r, defineFinalizableLivePreviewAdapter as s, FinalizableLivePreviewAdapter as t, markLiveMessageCancelled as u };