"use strict";
/*
 * Copyright OpenSearch Contributors
 * SPDX-License-Identifier: Apache-2.0
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerDetector = registerDetector;
exports.getDetector = getDetector;
exports.resetDetectorRegistry = resetDetectorRegistry;
exports.registerBuiltInDetectors = registerBuiltInDetectors;
const head_without_sort_1 = require("./rules/head_without_sort");
const division_by_zero_1 = require("./rules/division_by_zero");
const unsupported_window_function_1 = require("./rules/unsupported_window_function");
const multisearch_min_subsearch_1 = require("./rules/multisearch_min_subsearch");
const disabled_join_type_1 = require("./rules/disabled_join_type");
const dedup_consecutive_unsupported_1 = require("./rules/dedup_consecutive_unsupported");
const union_min_datasets_1 = require("./rules/union_min_datasets");
const replace_wildcard_asymmetry_1 = require("./rules/replace_wildcard_asymmetry");
const field_validation_1 = require("./rules/field_validation");
const registry = new Map();
function registerDetector(key, detector) {
    registry.set(key, detector);
}
function getDetector(key) {
    return registry.get(key);
}
function resetDetectorRegistry() {
    registry.clear();
    registerBuiltInDetectors();
}
function registerBuiltInDetectors() {
    registerDetector('head-without-sort', head_without_sort_1.headWithoutSortDetector);
    registerDetector('division-by-zero', division_by_zero_1.divisionByZeroDetector);
    registerDetector('unsupported-window-function-in-eventstats', unsupported_window_function_1.unsupportedWindowFunctionDetector);
    registerDetector('multisearch-min-subsearch', multisearch_min_subsearch_1.multisearchMinSubsearchDetector);
    registerDetector('disabled-join-type', disabled_join_type_1.disabledJoinTypeDetector);
    registerDetector('dedup-consecutive-unsupported', dedup_consecutive_unsupported_1.dedupConsecutiveUnsupportedDetector);
    registerDetector('union-min-datasets', union_min_datasets_1.unionMinDatasetsDetector);
    registerDetector('replace-wildcard-asymmetry', replace_wildcard_asymmetry_1.replaceWildcardAsymmetryDetector);
    registerDetector('field-validation', field_validation_1.fieldValidationDetector);
}
registerBuiltInDetectors();
//# sourceMappingURL=detector_registry.js.map