"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Names=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},encoding_1=()=>{var tmp=require("./private/encoding");return encoding_1=()=>tmp,tmp},unique_resource_name_1=()=>{var tmp=require("./private/unique-resource-name");return unique_resource_name_1=()=>tmp,tmp},uniqueid_1=()=>{var tmp=require("./private/uniqueid");return uniqueid_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp};class Names{static uniqueId(construct){const components=constructs_1().Node.of(construct).scopes.slice(1).map(c=>constructs_1().Node.of(c).id);return components.length>0?(0,uniqueid_1().makeUniqueId)(components):""}static nodeUniqueId(node){const components=node.scopes.slice(1).map(c=>constructs_1().Node.of(c).id);return components.length>0?(0,uniqueid_1().makeUniqueId)(components):""}static uniqueResourceName(construct,options){try{jsiiDeprecationWarnings().aws_cdk_lib_UniqueResourceNameOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.uniqueResourceName),error}const node=constructs_1().Node.of(construct),componentsPath=node.scopes.slice(node.scopes.indexOf(node.scopes.reverse().find(component=>stack_1().Stack.isStack(component)&&!(0,encoding_1().unresolved)(component.stackName)))).map(component=>stack_1().Stack.isStack(component)&&!(0,encoding_1().unresolved)(component.stackName)?component.stackName:constructs_1().Node.of(component).id);return(0,unique_resource_name_1().makeUniqueResourceName)(componentsPath,options)}constructor(){}}exports.Names=Names,_a=JSII_RTTI_SYMBOL_1,Names[_a]={fqn:"aws-cdk-lib.Names",version:"2.159.0"};
