"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FeatureFlags=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),constructs_1=require("constructs"),cxapi=require("../../cx-api");class FeatureFlags{static of(scope){return new FeatureFlags(scope)}constructor(construct){this.construct=construct}isEnabled(featureFlag){const context=constructs_1.Node.of(this.construct).tryGetContext(featureFlag);if(cxapi.CURRENT_VERSION_EXPIRED_FLAGS.includes(featureFlag)){if(context!==void 0)throw new Error(`Unsupported feature flag '${featureFlag}'. This flag existed on CDKv1 but has been removed in CDKv2. CDK will now behave as the same as when the flag is enabled.`);return!0}return context!==void 0?!!context:cxapi.futureFlagDefault(featureFlag)}}exports.FeatureFlags=FeatureFlags,_a=JSII_RTTI_SYMBOL_1,FeatureFlags[_a]={fqn:"aws-cdk-lib.FeatureFlags",version:"2.96.1"};
