/**
 * WhatsApp Channel Adapter
 *
 * WhatsApp integration via Baileys (@whiskeysockets/baileys).
 * Supports QR code pairing, text/media messaging, and group chats.
 * Baileys is an optional dependency loaded dynamically at runtime.
 */
import type { ChannelConfig, OutboundMessage, DeliveryResult } from '../index.js';
import { BaseChannel } from '../index.js';
/**
 * WhatsApp-specific configuration
 */
export interface WhatsAppConfig extends ChannelConfig {
    type: 'whatsapp';
    /** Phone number to register (with country code, e.g. +1234567890) */
    phoneNumber?: string;
    /** Directory to store session data (auth keys, etc.) */
    sessionDataPath?: string;
    /** Timeout for QR code pairing in ms (default: 60000) */
    qrTimeout?: number;
    /** Print QR code to terminal (default: true) */
    printQrInTerminal?: boolean;
    /** Browser name shown in WhatsApp linked devices */
    browserName?: string;
    /** Whether to mark messages as read automatically */
    markOnlineOnConnect?: boolean;
}
/**
 * WhatsApp contact info
 */
export interface WhatsAppContact {
    id: string;
    name?: string;
    notify?: string;
    imgUrl?: string;
}
/**
 * WhatsApp channel using Baileys (WhatsApp Web multi-device)
 */
export declare class WhatsAppChannel extends BaseChannel {
    private socket;
    private authState;
    private qrTimeout;
    private reconnecting;
    private reconnectionManager;
    constructor(config: WhatsAppConfig);
    private get waConfig();
    /**
     * Connect to WhatsApp via Baileys
     */
    connect(): Promise<void>;
    /**
     * Disconnect from WhatsApp
     */
    disconnect(): Promise<void>;
    /**
     * Send a WhatsApp message
     */
    send(message: OutboundMessage): Promise<DeliveryResult>;
    /**
     * Send a typing indicator
     */
    sendPresenceUpdate(jid: string, type?: 'composing' | 'paused'): Promise<void>;
    /**
     * Load existing auth state from disk
     */
    private loadAuthState;
    /**
     * Initialize fresh auth state
     */
    private initFreshAuthState;
    /**
     * Handle Baileys connection update
     */
    private handleConnectionUpdate;
    /**
     * Handle incoming messages
     */
    private handleMessagesUpsert;
    /**
     * Process a single incoming WhatsApp message
     */
    private processIncomingMessage;
    /**
     * Convert Baileys message to InboundMessage
     */
    private convertMessage;
    /**
     * Extract attachments from a Baileys message object
     */
    private extractAttachments;
    /**
     * Determine content type from message body
     */
    private determineContentType;
    /**
     * Build media content for sending
     */
    private buildMediaContent;
    /**
     * Normalize a phone number or chat ID to a WhatsApp JID
     */
    private normalizeJid;
}
export default WhatsAppChannel;
