"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LambdaDurationsWidget = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
const lambda_search_1 = require("../../metrics/lambda-search");
class LambdaDurationsWidget extends aws_cdk_lib_1.aws_cloudwatch.GraphWidget {
    constructor(props) {
        const { lambdaNames } = props;
        super({
            title: 'Lambda Duration',
            width: 6,
            height: 4,
            left: lambdaNames.map((lambda) => new lambda_search_1.LambdaSearchDurationsMetric({ lambdaSearchName: lambda })),
            legendPosition: aws_cdk_lib_1.aws_cloudwatch.LegendPosition.HIDDEN,
            leftAnnotations: [{ label: 'Integration Timeout', value: 30000 }],
            leftYAxis: { label: 'Milliseconds', showUnits: false },
        });
    }
}
exports.LambdaDurationsWidget = LambdaDurationsWidget;
