"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiMethodRequestsWidget = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
const __1 = require("../..");
class ApiMethodRequestsWidget extends aws_cdk_lib_1.aws_cloudwatch.GraphWidget {
    constructor(props) {
        const { apiName, stage, horizontalAnnotations, duration } = props;
        super({
            title: 'Method Requests',
            width: 6,
            height: 4,
            left: [new __1.ApiMethodRequestsMetric({ apiName, stage, period: duration })],
            leftYAxis: { label: 'Count', showUnits: false },
            legendPosition: aws_cdk_lib_1.aws_cloudwatch.LegendPosition.HIDDEN,
            leftAnnotations: horizontalAnnotations !== null && horizontalAnnotations !== void 0 ? horizontalAnnotations : [],
        });
    }
}
exports.ApiMethodRequestsWidget = ApiMethodRequestsWidget;
