"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlbListenerTarget=exports.AlbTarget=exports.AlbArnTarget=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var elbv2=()=>{var tmp=require("../../aws-elasticloadbalancingv2");return elbv2=()=>tmp,tmp};class AlbArnTarget{constructor(albArn,port){this.albArn=albArn,this.port=port}attachToNetworkTargetGroup(targetGroup){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_INetworkTargetGroup(targetGroup)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.attachToNetworkTargetGroup),error}return this._attach(targetGroup)}_attach(_targetGroup){return{targetType:elbv2().TargetType.ALB,targetJson:{id:this.albArn,port:this.port}}}}exports.AlbArnTarget=AlbArnTarget,_a=JSII_RTTI_SYMBOL_1,AlbArnTarget[_a]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2_targets.AlbArnTarget",version:"2.159.0"};class AlbTarget extends AlbArnTarget{constructor(alb,port){super(alb.loadBalancerArn,port);try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_elasticloadbalancingv2_targets.AlbTarget","Use `AlbListenerTarget` instead or\n`AlbArnTarget` for an imported load balancer. This target does not automatically\nadd a dependency between the ALB listener and resulting NLB target group,\nwithout which may cause stack deployments to fail if the NLB target group is provisioned\nbefore the listener has been fully created."),jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_IApplicationLoadBalancer(alb)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AlbTarget),error}}}exports.AlbTarget=AlbTarget,_b=JSII_RTTI_SYMBOL_1,AlbTarget[_b]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2_targets.AlbTarget",version:"2.159.0"};class AlbListenerTarget extends AlbArnTarget{constructor(albListener){super(albListener.loadBalancer.loadBalancerArn,albListener.port),this.albListener=albListener;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_ApplicationListener(albListener)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AlbListenerTarget),error}}attach(targetGroup){return targetGroup.node.addDependency(this.albListener),super._attach(targetGroup)}attachToNetworkTargetGroup(targetGroup){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_INetworkTargetGroup(targetGroup)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.attachToNetworkTargetGroup),error}return this.attach(targetGroup)}}exports.AlbListenerTarget=AlbListenerTarget,_c=JSII_RTTI_SYMBOL_1,AlbListenerTarget[_c]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2_targets.AlbListenerTarget",version:"2.159.0"};
