"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GlobalAcceleratorTarget=exports.GlobalAcceleratorDomainTarget=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class GlobalAcceleratorDomainTarget{acceleratorDomainName;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_route53_targets.GlobalAcceleratorDomainTarget",version:"2.256.1"};static GLOBAL_ACCELERATOR_ZONE_ID="Z2BJ6XQ5FK7U4H";constructor(acceleratorDomainName,props){this.acceleratorDomainName=acceleratorDomainName,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53_targets_IAliasRecordTargetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GlobalAcceleratorDomainTarget),error}}bind(_record,_zone){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53_IRecordSet(_record),jsiiDeprecationWarnings().aws_cdk_lib_aws_route53_IHostedZone(_zone)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{hostedZoneId:GlobalAcceleratorTarget.GLOBAL_ACCELERATOR_ZONE_ID,dnsName:this.acceleratorDomainName,evaluateTargetHealth:this.props?.evaluateTargetHealth}}}exports.GlobalAcceleratorDomainTarget=GlobalAcceleratorDomainTarget;class GlobalAcceleratorTarget extends GlobalAcceleratorDomainTarget{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_route53_targets.GlobalAcceleratorTarget",version:"2.256.1"};constructor(accelerator,props){super(toIAccelerator(accelerator).dnsName,props);try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_globalaccelerator_IAcceleratorRef(accelerator),jsiiDeprecationWarnings().aws_cdk_lib_aws_route53_targets_IAliasRecordTargetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GlobalAcceleratorTarget),error}}}exports.GlobalAcceleratorTarget=GlobalAcceleratorTarget;function toIAccelerator(accelerator){if(!("dnsName"in accelerator)||typeof accelerator.dnsName!="string")throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`AcceleratorInstanceShouldImplement`,`'accelerator' instance should implement IAccelerator, but doesn't: ${accelerator.constructor.name}`);return accelerator}
