"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnJson=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},custom_resource_1=()=>{var tmp=require("./custom-resource");return custom_resource_1=()=>tmp,tmp},cfn_utils_provider_1=()=>{var tmp=require("./private/cfn-utils-provider");return cfn_utils_provider_1=()=>tmp,tmp},consts_1=()=>{var tmp=require("./private/cfn-utils-provider/consts");return consts_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},stack_trace_1=()=>{var tmp=require("./stack-trace");return stack_trace_1=()=>tmp,tmp};class CfnJson extends constructs_1().Construct{constructor(scope,id,props){super(scope,id),this.creationStack=[];try{jsiiDeprecationWarnings().aws_cdk_lib_CfnJsonProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnJson),error}this.creationStack=(0,stack_trace_1().captureStackTrace)(),this.jsonString=stack_1().Stack.of(this).toJsonString(props.value);const resource=new(custom_resource_1()).CustomResource(this,"Resource",{serviceToken:cfn_utils_provider_1().CfnUtilsProvider.getOrCreate(this),resourceType:consts_1().CfnUtilsResourceType.CFN_JSON,properties:{Value:this.jsonString}});this.value=resource.getAtt("Value")}toJSON(){return this.jsonString}resolve(_context){try{jsiiDeprecationWarnings().aws_cdk_lib_IResolveContext(_context)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.resolve),error}return this.value}}exports.CfnJson=CfnJson,_a=JSII_RTTI_SYMBOL_1,CfnJson[_a]={fqn:"aws-cdk-lib.CfnJson",version:"2.159.0"};
