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<DialogItem>;
    /** 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<void>;
    /** Archive a dialog (wired through the active adapter). */
    archiveDialog: (id: string) => Promise<void>;
    /** Host callback that pages archived dialogs — gates the archive UI. */
    fetchArchivedDialogs?: (params: FetchDialogsParams) => Promise<FetchDialogsResult>;
    /** Host callback that restores an archived dialog — gates the restore UI. */
    unarchiveDialog?: (id: string) => Promise<void>;
}
/**
 * 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<FetchDialogsResult>) | undefined;
    unarchiveDialog: ((id: string) => Promise<void>) | undefined;
    archiveOpen: boolean;
    archivedDialogs: DialogItem[];
    archivedCursor: string | null;
    archivedLoading: boolean;
    openArchive: () => void;
    closeArchive: () => void;
    loadArchivedPage: (cursor?: string) => Promise<void>;
    handleArchivedSelect: (id: string) => void;
    handleSelectDialog: (id: string) => void;
    isOpeningDialog: boolean;
    isViewingArchived: boolean;
    handleBack: () => void;
    activeDialog: DialogItem | undefined;
    renameTarget: DialogItem | null;
    setRenameTarget: import("react").Dispatch<import("react").SetStateAction<DialogItem | null>>;
    archiveTarget: DialogItem | null;
    setArchiveTarget: import("react").Dispatch<import("react").SetStateAction<DialogItem | null>>;
    restoreTarget: DialogItem | null;
    setRestoreTarget: import("react").Dispatch<import("react").SetStateAction<DialogItem | null>>;
    handleConfirmRename: (name: string) => void;
    handleConfirmArchive: () => Promise<void>;
    handleConfirmRestore: () => Promise<void>;
};
//# sourceMappingURL=use-chat-dialog-manager.d.ts.map