"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.KafkaDlq=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};class KafkaDlq{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda_event_sources.KafkaDlq",version:"2.256.1"};topicName;constructor(topicName){if(core_1().Token.isUnresolved(topicName))this.topicName=topicName;else{if(!topicName||topicName.trim().length===0)throw new TypeError("Topic name cannot be empty");const cleanTopicName=topicName.startsWith("kafka://")?topicName.substring(8):topicName;if(cleanTopicName.length===0)throw new TypeError("Topic name cannot be empty after removing kafka:// prefix");if(!/^[a-zA-Z0-9._-]+$/.test(cleanTopicName))throw new TypeError("Topic name contains invalid characters. Only alphanumeric characters, dots, underscores, and hyphens are allowed");this.topicName=topicName.startsWith("kafka://")?topicName:`kafka://${topicName}`}}bind(_target,_targetHandler){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IEventSourceMapping(_target),jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(_targetHandler)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{destination:this.topicName}}}exports.KafkaDlq=KafkaDlq;
