import { OnDestroy } from '@angular/core'; import { type AparteConfig, type AparteConversation, type AparteStorageAdapter } from '@aparte/core'; import type { AparteMessage } from '@aparte/core'; import * as i0 from "@angular/core"; /** * Angular 19 Signal-based wrapper around AparteConversationManager. * * Register a storage adapter before calling init(): * ```ts * // app.config.ts * export const appConfig: ApplicationConfig = { * providers: [ * { * provide: CONVERSATION_ADAPTER, * useValue: new IndexedDBAdapter('my-app-convs'), * }, * ], * }; * ``` * * Then inject ConversationManagerService in any component or service. */ export declare class ConversationManagerService implements OnDestroy { private _manager; private _unsubscribe; /** All conversations (active + archived). */ readonly conversations: import("@angular/core").WritableSignal; /** Active conversations only, newest first. */ readonly activeConversations: import("@angular/core").Signal; /** Archived conversations, newest first. */ readonly archivedConversations: import("@angular/core").Signal; /** Currently active conversation id. */ readonly activeId: import("@angular/core").WritableSignal; /** The active conversation object (null when no conv is selected). */ readonly activeConversation: import("@angular/core").Signal; /** * Initialise the service with a storage adapter. * Call once in your root component or app initialiser. */ init(adapter: AparteStorageAdapter, config?: AparteConfig): Promise; ngOnDestroy(): void; /** Create a new empty conversation, make it active, return it. */ createNew(title?: string): Promise; /** Append a message to a conversation and persist. */ addMessage(convId: string, msg: AparteMessage): Promise; /** * Replace all messages for a conversation. * Call after branch navigation or AI response completion. */ updateMessages(convId: string, messages: AparteMessage[]): Promise; /** Permanently delete a conversation. */ delete(id: string): Promise; /** Archive a conversation. */ archive(id: string): Promise; /** Restore an archived conversation. */ unarchive(id: string): Promise; /** Pin a conversation to the top of the list. */ pin(id: string): Promise; /** Unpin a conversation. */ unpin(id: string): Promise; /** Rename a conversation. */ updateTitle(id: string, title: string): Promise; private _assertInit; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }