"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FunctionUrlOrigin=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},cloudfront=()=>{var tmp=require("../../aws-cloudfront");return cloudfront=()=>tmp,tmp},cdk=()=>{var tmp=require("../../core");return cdk=()=>tmp,tmp};class FunctionUrlOrigin extends cloudfront().OriginBase{constructor(lambdaFunctionUrl,props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunctionUrl(lambdaFunctionUrl),jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_origins_FunctionUrlOriginProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FunctionUrlOrigin),error}const domainName=cdk().Fn.select(2,cdk().Fn.split("/",lambdaFunctionUrl.url));super(domainName,props),this.props=props,(0,utils_1().validateSecondsInRangeOrUndefined)("readTimeout",1,180,props.readTimeout),(0,utils_1().validateSecondsInRangeOrUndefined)("keepaliveTimeout",1,180,props.keepaliveTimeout)}renderCustomOriginConfig(){return{originSslProtocols:[cloudfront().OriginSslPolicy.TLS_V1_2],originProtocolPolicy:cloudfront().OriginProtocolPolicy.HTTPS_ONLY,originReadTimeout:this.props.readTimeout?.toSeconds(),originKeepaliveTimeout:this.props.keepaliveTimeout?.toSeconds()}}}exports.FunctionUrlOrigin=FunctionUrlOrigin,_a=JSII_RTTI_SYMBOL_1,FunctionUrlOrigin[_a]={fqn:"aws-cdk-lib.aws_cloudfront_origins.FunctionUrlOrigin",version:"2.159.0"};
