"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnJson=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),constructs_1=require("constructs"),custom_resource_1=require("./custom-resource"),cfn_utils_provider_1=require("./private/cfn-utils-provider"),stack_1=require("./stack"),stack_trace_1=require("./stack-trace");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=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:"Custom::AWSCDKCfnJson",properties:{Value:this.jsonString}});this.value=resource.getAtt("Value")}toJSON(){return this.jsonString}resolve(_){try{jsiiDeprecationWarnings.aws_cdk_lib_IResolveContext(_)}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.46.0"};
//# sourceMappingURL=cfn-json.js.map
