"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetricTotalComparisonType = exports.MetricExplorerComparison = exports.isMetricsExplorerCompatibleDimension = exports.METRICS_EXPLORER_FILTER_OPERATORS = void 0;
const field_1 = require("./field");
const filter_1 = require("./filter");
/**
 * Operators the Metrics Explorer filter UI can render (see getOperatorOptions).
 * The compile-time validation of a metric's spotlight `default_filter` and the
 * explorer's operator dropdown both read from this single list.
 */
exports.METRICS_EXPLORER_FILTER_OPERATORS = [
    filter_1.FilterOperator.EQUALS,
    filter_1.FilterOperator.NOT_EQUALS,
];
/**
 * A dimension whose type can be used to segment or filter in the Metrics
 * Explorer: a string or boolean that is not a time-derived dimension.
 */
const isMetricsExplorerCompatibleDimension = (dimension) => !dimension.timeIntervalBaseDimensionName &&
    (dimension.type === field_1.DimensionType.STRING ||
        dimension.type === field_1.DimensionType.BOOLEAN);
exports.isMetricsExplorerCompatibleDimension = isMetricsExplorerCompatibleDimension;
var MetricExplorerComparison;
(function (MetricExplorerComparison) {
    MetricExplorerComparison["NONE"] = "none";
    MetricExplorerComparison["PREVIOUS_PERIOD"] = "previous_period";
    MetricExplorerComparison["DIFFERENT_METRIC"] = "different_metric";
})(MetricExplorerComparison || (exports.MetricExplorerComparison = MetricExplorerComparison = {}));
var MetricTotalComparisonType;
(function (MetricTotalComparisonType) {
    MetricTotalComparisonType["NONE"] = "none";
    MetricTotalComparisonType["PREVIOUS_PERIOD"] = "previous_period";
    MetricTotalComparisonType["ROLLING_DAYS"] = "rolling_days";
})(MetricTotalComparisonType || (exports.MetricTotalComparisonType = MetricTotalComparisonType = {}));
//# sourceMappingURL=metricsExplorer.js.map