"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) IBM Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValidator = getValidator;
const jsonLanguageTypes_1 = require("../../jsonLanguageTypes");
const draft04Validator_1 = require("./draft04Validator");
const draft07Validator_1 = require("./draft07Validator");
const draft2019Validator_1 = require("./draft2019Validator");
const draft2020Validator_1 = require("./draft2020Validator");
function getValidator(schemaDraft) {
    switch (schemaDraft) {
        case jsonLanguageTypes_1.SchemaDraft.v4:
            return new draft04Validator_1.Draft04Validator();
        case jsonLanguageTypes_1.SchemaDraft.v7:
            return new draft07Validator_1.Draft07Validator();
        case jsonLanguageTypes_1.SchemaDraft.v2019_09:
            return new draft2019Validator_1.Draft2019Validator();
        case jsonLanguageTypes_1.SchemaDraft.v2020_12:
            return new draft2020Validator_1.Draft2020Validator();
        default:
            return new draft07Validator_1.Draft07Validator(); // fallback
    }
}
//# sourceMappingURL=validatorFactory.js.map