"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BucketPolicyStatements=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_iam_1=()=>{var tmp=require("../../../aws-iam");return aws_iam_1=()=>tmp,tmp},mixins_1=()=>{var tmp=require("../../../core/lib/mixins");return mixins_1=()=>tmp,tmp},s3_generated_1=()=>{var tmp=require("../s3.generated");return s3_generated_1=()=>tmp,tmp};class BucketPolicyStatements extends mixins_1().Mixin{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3.mixins.BucketPolicyStatements",version:"2.256.1"};statements;constructor(statements){super(),this.statements=statements}supports(construct){return s3_generated_1().CfnBucketPolicy.isCfnBucketPolicy(construct)}applyTo(policy){if(!this.supports(policy))return;const policyDocument=this.getPolicyDocument(policy);policyDocument.addStatements(...this.statements),policy.policyDocument=policyDocument}getPolicyDocument(policy){return policy.policyDocument instanceof aws_iam_1().PolicyDocument?policy.policyDocument:aws_iam_1().PolicyDocument.fromJson(policy.policyDocument)}}exports.BucketPolicyStatements=BucketPolicyStatements;
