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