import type { DialogItem } from '../types/component.types'; import type { FetchDialogsParams, FetchDialogsResult } from './use-nats-chat-adapter'; export interface UseChatDialogManagerArgs { /** Active (non-archived) dialogs from the unified chat state. */ dialogs: ReadonlyArray; /** Currently-open dialog id. */ activeDialogId: string | null | undefined; /** Open a dialog by id. */ selectDialog: (id: string | null) => void; /** Reset the open conversation (drops back to the list / empty state). */ clearMessages: () => void; /** Rename a dialog (wired through the active adapter). */ renameDialog: (id: string, title: string) => Promise; /** Archive a dialog (wired through the active adapter). */ archiveDialog: (id: string) => Promise; /** Host callback that pages archived dialogs — gates the archive UI. */ fetchArchivedDialogs?: (params: FetchDialogsParams) => Promise; /** Host callback that restores an archived dialog — gates the restore UI. */ unarchiveDialog?: (id: string) => Promise; } /** * Owns the chat panel's dialog-history concerns so `EmbeddableChat` stays an * orchestrator rather than a state dump: * - the Chat Archive page (open / paginate the archived list), * - read-only "archived conversation" mode (open from the archive, restore, * back-to-archive navigation), * - the Rename / Archive / Unarchive confirmation-modal targets + handlers. * * Returns flat fields (intentionally the same names the JSX already uses) so * the consuming component reads as a thin wiring layer. */ export declare function useChatDialogManager({ dialogs, activeDialogId, selectDialog, clearMessages, renameDialog, archiveDialog, fetchArchivedDialogs, unarchiveDialog, }: UseChatDialogManagerArgs): { fetchArchivedDialogs: ((params: FetchDialogsParams) => Promise) | undefined; unarchiveDialog: ((id: string) => Promise) | undefined; archiveOpen: boolean; archivedDialogs: DialogItem[]; archivedCursor: string | null; archivedLoading: boolean; archivedPending: boolean; openArchive: () => void; closeArchive: () => void; loadArchivedPage: (cursor?: string) => Promise; handleArchivedSelect: (id: string) => void; handleSelectDialog: (id: string) => void; isOpeningDialog: boolean; isViewingArchived: boolean; handleBack: () => void; resetToNewChat: () => void; activeDialog: DialogItem | undefined; renameTarget: DialogItem | null; setRenameTarget: import("react").Dispatch>; archiveTarget: DialogItem | null; setArchiveTarget: import("react").Dispatch>; restoreTarget: DialogItem | null; setRestoreTarget: import("react").Dispatch>; handleConfirmRename: (name: string) => void; handleConfirmArchive: () => Promise; handleConfirmRestore: () => Promise; }; //# sourceMappingURL=use-chat-dialog-manager.d.ts.map