"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.elasticSearchApiMetricPropsToMetricProps = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
/**
 * Helper for mapping IElasticSearchApiMetricProps to actual metric props, with defaults for optionals
 */
const elasticSearchApiMetricPropsToMetricProps = (props, metricName, label, statistic) => {
    var _a;
    return ({
        namespace: 'AWS/ES',
        metricName,
        dimensionsMap: {
            DomainName: props.domainName,
            ClientId: props.accountId,
        },
        statistic,
        label,
        period: (_a = props.period) !== null && _a !== void 0 ? _a : aws_cdk_lib_1.Duration.minutes(5),
        color: props.color,
    });
};
exports.elasticSearchApiMetricPropsToMetricProps = elasticSearchApiMetricPropsToMetricProps;
