"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterScenarios = filterScenarios;
function filterScenarios(scenarios, opts) {
    let result = scenarios;
    if (opts.scenarioIds && opts.scenarioIds.length > 0) {
        const idSet = new Set(opts.scenarioIds);
        result = result.filter((scenario) => idSet.has(scenario.id));
    }
    if (opts.includeTags && opts.includeTags.length > 0) {
        result = result.filter((scenario) => {
            const tags = scenario.tags ?? [];
            return opts.includeTags.every((tag) => tags.includes(tag));
        });
    }
    if (opts.skipScenarioIds && opts.skipScenarioIds.length > 0) {
        const skipSet = new Set(opts.skipScenarioIds);
        result = result.filter((scenario) => !skipSet.has(scenario.id));
    }
    return result;
}
//# sourceMappingURL=scenario-filter.js.map