/**
 * Telegram Account Manager
 *
 * Manages multiple Telegram bot accounts, including:
 * - Account configuration storage
 * - Bot instance management
 * - Runner lifecycle
 * - Status tracking
 * - Bot username mapping
 */
import type { Bot, Context } from 'grammy';
import { run } from '@grammyjs/runner';
import type { TelegramAccountConfig, ChannelStatus } from '@xopcai/xopc/channels/channel-domain.js';
export declare class TelegramAccountManager {
    private accounts;
    private bots;
    private runners;
    private statuses;
    private botUsernames;
    private startingAccounts;
    registerAccount(account: TelegramAccountConfig): void;
    getAccount(accountId: string): TelegramAccountConfig | undefined;
    getAllAccounts(): TelegramAccountConfig[];
    /** Clear all accounts and runtime state (used when reloading channel config). */
    reset(): void;
    registerBot(accountId: string, bot: Bot): void;
    getBot(accountId: string): Bot | undefined;
    registerRunner(accountId: string, runner: ReturnType<typeof run>): void;
    stopRunner(accountId: string): Promise<void>;
    isStarting(accountId: string): boolean;
    markStarting(accountId: string): void;
    markStartComplete(accountId: string): void;
    isRunning(accountId: string): boolean;
    updateStatus(status: ChannelStatus): void;
    getStatus(accountId: string): ChannelStatus | undefined;
    setBotUsername(accountId: string, username: string): void;
    getBotUsername(accountId: string): string | undefined;
    /** Map the bot handling this update to a configured account id (session keys must match inbound). */
    resolveAccountIdFromContext(ctx: Context): string;
}
