"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRefElement=exports.CfnElement=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},lazy_1=()=>{var tmp=require("./lazy");return lazy_1=()=>tmp,tmp},cxschema=()=>{var tmp=require("../../cloud-assembly-schema");return cxschema=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};const CFN_ELEMENT_SYMBOL=Symbol.for("@aws-cdk/core.CfnElement");class CfnElement extends constructs_1().Construct{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnElement",version:"2.256.1"};static isCfnElement(x){return CFN_ELEMENT_SYMBOL in x}logicalId;stack;_logicalIdOverride;_logicalIdLocked;constructor(scope,id){super(scope,id),Object.defineProperty(this,CFN_ELEMENT_SYMBOL,{value:!0}),this.stack=stack_1().Stack.of(this),this.logicalId=lazy_1().Lazy.uncachedString({produce:()=>this._synthesizeLogicalId()},{displayHint:`${notTooLong(constructs_1().Node.of(this).path)}.LogicalID`}),this.node.tryGetContext(cxapi().DISABLE_LOGICAL_ID_METADATA)||constructs_1().Node.of(this).addMetadata(cxschema().ArtifactMetadataEntryType.LOGICAL_ID,this.logicalId),(!this.node.tryGetContext(cxapi().DISABLE_CREATION_STACK_TRACES)||(0,debug_1().debugModeEnabled)())&&this.node.addMetadata(cxschema().ArtifactMetadataEntryType.CREATION_STACK,(0,stack_trace_1().captureStackTrace)(new.target))}with(...mixins){return(0,mixin_metadata_1().withMixins)(this,...mixins)}overrideLogicalId(newLogicalId){if(this._logicalIdLocked)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`LogicalIdLocked`,`The logicalId for resource at path ${constructs_1().Node.of(this).path} has been locked and cannot be overridden
Make sure you are calling "overrideLogicalId" before Stack.exportValue`,this);this._logicalIdOverride=newLogicalId}_lockLogicalId(){this._logicalIdLocked=!0}get creationStack(){return constructs_1().Node.of(this).metadata.find(md=>md.type===cxschema().ArtifactMetadataEntryType.CREATION_STACK)?.data??[]}_synthesizeLogicalId(){return this._logicalIdOverride?this._logicalIdOverride:this.stack.getLogicalId(this)}}exports.CfnElement=CfnElement;class CfnRefElement extends CfnElement{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.CfnRefElement",version:"2.256.1"};get ref(){return token_1().Token.asString(cfn_reference_1().CfnReference.for(this,"Ref"))}}exports.CfnRefElement=CfnRefElement;function notTooLong(x){return x.length<100?x:x.slice(0,47)+"..."+x.slice(-47)}var cfn_reference_1=()=>{var tmp=require("./private/cfn-reference");return cfn_reference_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("./errors");return errors_1=()=>tmp,tmp},mixin_metadata_1=()=>{var tmp=require("./mixins/private/mixin-metadata");return mixin_metadata_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("./private/literal-string");return literal_string_1=()=>tmp,tmp},stack_trace_1=()=>{var tmp=require("./stack-trace");return stack_trace_1=()=>tmp,tmp},debug_1=()=>{var tmp=require("./debug");return debug_1=()=>tmp,tmp};
