"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiGateway=exports.ApiGatewayDomain=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class ApiGatewayDomain{domainName;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_route53_targets.ApiGatewayDomain",version:"2.256.1"};constructor(domainName){this.domainName=domainName;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_IDomainName(domainName)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiGatewayDomain),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{dnsName:this.domainName.domainNameAliasDomainName,hostedZoneId:this.domainName.domainNameAliasHostedZoneId}}}exports.ApiGatewayDomain=ApiGatewayDomain;class ApiGateway extends ApiGatewayDomain{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_route53_targets.ApiGateway",version:"2.256.1"};constructor(api){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_RestApiBase(api)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiGateway),error}if(!api.domainName)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`DefineDefaultDomainName`,"API does not define a default domain name",api);super(api.domainName)}}exports.ApiGateway=ApiGateway;
