/**
 * Zalo Channel Adapter
 *
 * Connects to Zalo API for messaging in bot or personal mode.
 * This is a stub implementation.
 */
import { logger } from '../../utils/logger.js';
export class ZaloAdapter {
    config;
    running = false;
    constructor(config) {
        this.config = { ...config };
    }
    async start() {
        if (this.running) {
            throw new Error('ZaloAdapter is already running');
        }
        logger.debug('ZaloAdapter: initializing', { appId: this.config.appId, mode: this.config.mode });
        this.running = true;
    }
    async stop() {
        if (!this.running) {
            throw new Error('ZaloAdapter is not running');
        }
        logger.debug('ZaloAdapter: disconnecting');
        this.running = false;
    }
    isRunning() {
        return this.running;
    }
    async sendMessage(userId, text) {
        if (!this.running) {
            throw new Error('ZaloAdapter is not running');
        }
        logger.debug('ZaloAdapter: sending message', { userId, textLength: text.length });
        return { success: true };
    }
    async sendImage(userId, imageUrl) {
        if (!this.running) {
            throw new Error('ZaloAdapter is not running');
        }
        logger.debug('ZaloAdapter: sending image', { userId, imageUrl });
        return { success: true };
    }
    getMode() {
        return this.config.mode;
    }
    getConfig() {
        return { ...this.config };
    }
}
export default ZaloAdapter;
//# sourceMappingURL=index.js.map