"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SHOW_FOR_SHARING_RULE_ENTITY = exports.SHOW_FOR_DYNAMIC_RULE_ENTITY = exports.SHOW_FOR_STATIC_AND_DATE_RULE_ENTITY = exports.SHOW_FOR_STATIC_AND_NUMBER_RULE_ENTITY = exports.SHOW_FOR_STATIC_AND_STRING_RULE_ENTITY = exports.SHOW_FOR_STATIC_RULE_ENTITY = void 0;
const uiSchemaRuleEffects_1 = require("../../../enums/uiSchemaRuleEffects");
/**
 * Shared metric rules for uiSchema
 */
/** Show if the type is set to static */
exports.SHOW_FOR_STATIC_RULE_ENTITY = {
    condition: {
        scope: "/properties/_metric/properties/type",
        schema: { const: "static" },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
exports.SHOW_FOR_STATIC_AND_STRING_RULE_ENTITY = {
    condition: {
        schema: {
            type: "object",
            properties: {
                _metric: {
                    type: "object",
                    properties: {
                        type: { const: "static" },
                        valueType: { const: "string" },
                    },
                },
            },
        },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
exports.SHOW_FOR_STATIC_AND_NUMBER_RULE_ENTITY = {
    condition: {
        schema: {
            type: "object",
            properties: {
                _metric: {
                    type: "object",
                    properties: {
                        type: { const: "static" },
                        valueType: { const: "number" },
                    },
                },
            },
        },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
exports.SHOW_FOR_STATIC_AND_DATE_RULE_ENTITY = {
    condition: {
        schema: {
            type: "object",
            properties: {
                _metric: {
                    type: "object",
                    properties: {
                        type: { const: "static" },
                        valueType: { const: "date" },
                    },
                },
            },
        },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
/** Show if the type is set to dynamic */
exports.SHOW_FOR_DYNAMIC_RULE_ENTITY = {
    condition: {
        scope: "/properties/_metric/properties/type",
        schema: { const: "dynamic" },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
/** Show if sharing is enabled */
exports.SHOW_FOR_SHARING_RULE_ENTITY = {
    condition: {
        scope: "/properties/_metric/properties/shareable",
        schema: { const: true },
    },
    effect: uiSchemaRuleEffects_1.UiSchemaRuleEffects.SHOW,
};
//# sourceMappingURL=rules.js.map