import { getSlackService } from '../../slack/slack.service.js';
export class SlackMessengerAdapter {
    platform = 'slack';
    async initialize(_config) {
        // Slack is initialized by existing SlackService bootstrap path.
    }
    async sendMessage(channel, text, options) {
        const slack = getSlackService();
        if (!slack.isConnected()) {
            throw new Error('Slack is not connected');
        }
        await slack.sendMessage({ channelId: channel, text, threadTs: options?.threadId });
    }
    getStatus() {
        const slack = getSlackService();
        return {
            connected: slack.isConnected(),
            platform: this.platform,
            details: Object.fromEntries(Object.entries(slack.getStatus())),
        };
    }
    async disconnect() {
        const slack = getSlackService();
        await slack.disconnect();
    }
}
//# sourceMappingURL=slack-messenger.adapter.js.map