"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ClusterSettings=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var mixins_1=()=>{var tmp=require("../../../core/lib/mixins");return mixins_1=()=>tmp,tmp},ecs_generated_1=()=>{var tmp=require("../ecs.generated");return ecs_generated_1=()=>tmp,tmp};class ClusterSettings extends mixins_1().Mixin{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs.mixins.ClusterSettings",version:"2.256.1"};settings;constructor(settings){super(),this.settings=settings}supports(construct){return ecs_generated_1().CfnCluster.isCfnCluster(construct)}applyTo(cluster){if(!this.supports(cluster))return;const clusterSettings=Array.isArray(cluster.clusterSettings)?[...cluster.clusterSettings]:cluster.clusterSettings===void 0?[]:[cluster.clusterSettings];for(const setting of this.settings){const existingIndex=clusterSettings.findIndex(currentSetting=>currentSetting?.name===setting.name);existingIndex>=0?clusterSettings[existingIndex]=setting:clusterSettings.push(setting)}cluster.clusterSettings=clusterSettings}}exports.ClusterSettings=ClusterSettings;
