"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LearningLayer = void 0;
class LearningLayer {
    store;
    constructor(store) {
        this.store = store;
    }
    process(result, isPositive = true) {
        let count = 0;
        for (const ep of result.patterns) {
            this.store.addOrUpdatePattern(ep.category, ep.description, ep.from, ep.to, isPositive, ep.conditions || [], 'global', result.stepUsed, result.language);
            count++;
        }
        return count;
    }
    processOne(ep, stepUsed, language, isPositive = true) {
        this.store.addOrUpdatePattern(ep.category, ep.description, ep.from, ep.to, isPositive, ep.conditions || [], 'global', stepUsed, language);
    }
    getStore() {
        return this.store;
    }
}
exports.LearningLayer = LearningLayer;
//# sourceMappingURL=learning-layer.js.map