import { WikipediaTool } from "./WikipediaTool.js";
export var ToolsFactory;
(function(ToolsFactory) {
    let Tools;
    (function(Tools) {
        Tools["Wikipedia"] = "wikipedia.WikipediaToolSpec";
    })(Tools = ToolsFactory.Tools || (ToolsFactory.Tools = {}));
    async function createTool(key, ...params) {
        if (key === "wikipedia.WikipediaToolSpec") {
            return new WikipediaTool(...params);
        }
        throw new Error(`Sorry! Tool ${key} is not supported yet. Options: ${params}`);
    }
    ToolsFactory.createTool = createTool;
    async function createTools(record) {
        const tools = [];
        for(const key in record){
            const params = record[key];
            tools.push(await createTool(key, // @ts-expect-error
            Array.isArray(params) ? params : [
                params
            ]));
        }
        return tools;
    }
    ToolsFactory.createTools = createTools;
})(ToolsFactory || (ToolsFactory = {}));
