"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AIProviderFactory = void 0;
const RuleBasedAIProvider_js_1 = require("./RuleBasedAIProvider.js");
const OpenAIProvider_js_1 = require("./OpenAIProvider.js");
class AIProviderFactory {
    static create(config) {
        switch (config.provider.toLowerCase()) {
            case "openai":
                return new OpenAIProvider_js_1.OpenAIProvider(config);
            case "anthropic":
                // Anthropic shares the same HTTP shape as OpenAI when using the OpenAI-compatible endpoint.
                return new OpenAIProvider_js_1.OpenAIProvider(config);
            case "rule":
            case "local":
            default:
                return new RuleBasedAIProvider_js_1.RuleBasedAIProvider(config);
        }
    }
}
exports.AIProviderFactory = AIProviderFactory;
