import { modelMatchingEngine } from '../model-database/model-engine.js';
export class DatabaseEngine {
    static instance;
    static getInstance() {
        if (!DatabaseEngine.instance) {
            DatabaseEngine.instance = new DatabaseEngine();
        }
        return DatabaseEngine.instance;
    }
    /**
     * Get model lists (sync - uses cached data)
     */
    getDatabases() {
        const results = modelMatchingEngine.getModels();
        return this.processResults(results);
    }
    /**
     * Get model lists asynchronously - fetches fresh data
     */
    async getDatabasesAsync() {
        const results = await modelMatchingEngine.getModelsAsync();
        return this.processResults(results);
    }
    /**
     * Process model results into database result
     */
    processResults(results) {
        return {
            openModels: results.openModels,
            proprietaryModels: results.proprietaryModels,
            latestModels: results.latestModels,
            allModels: results.allModels,
        };
    }
}
export const databaseEngine = DatabaseEngine.getInstance();
//# sourceMappingURL=database-engine.js.map