"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpApiHelper=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 HttpApiHelper{httpApi;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2.HttpApiHelper",version:"2.256.1"};static fromHttpApi(httpApi){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_IHttpApiRef(httpApi)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromHttpApi),error}return new HttpApiHelper(httpApi)}constructor(httpApi){this.httpApi=httpApi}arnForExecuteApi(method,path,stage){if(path&&!core_1().Token.isUnresolved(path)&&!path.startsWith("/"))throw new(core_1()).ValidationError((0,literal_string_1().lit)`PathStart`,`Path must start with '/': ${path}`,this.httpApi);return method&&method.toUpperCase()==="ANY"&&(method="*"),core_1().Stack.of(this.httpApi).formatArn({service:"execute-api",account:this.httpApi.env.account,region:this.httpApi.env.region,resource:this.httpApi.apiRef.apiId,arnFormat:core_1().ArnFormat.SLASH_RESOURCE_NAME,resourceName:`${stage??"*"}/${method??"*"}${path??"/*"}`})}}exports.HttpApiHelper=HttpApiHelper;
