"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.OriginGroup=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class OriginGroup{constructor(props){this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_origins_OriginGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,OriginGroup),error}}bind(scope,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_OriginBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const primaryOriginConfig=this.props.primaryOrigin.bind(scope,options);if(primaryOriginConfig.failoverConfig)throw new Error("An OriginGroup cannot use an Origin with its own failover configuration as its primary origin!");return{originProperty:primaryOriginConfig.originProperty,failoverConfig:{failoverOrigin:this.props.fallbackOrigin,statusCodes:this.props.fallbackStatusCodes}}}}exports.OriginGroup=OriginGroup,_a=JSII_RTTI_SYMBOL_1,OriginGroup[_a]={fqn:"aws-cdk-lib.aws_cloudfront_origins.OriginGroup",version:"2.159.0"};
