"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SfnStateMachine=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp};class SfnStateMachine{constructor(machine,props={}){this.machine=machine,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_IStateMachine(machine),jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_SfnStateMachineProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SfnStateMachine),error}this.role=props.role??(0,util_1().singletonEventRole)(machine),machine.grantStartExecution(this.role)}bind(_rule,_id){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_IRule(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return this.props.deadLetterQueue&&(0,util_1().addToDeadLetterQueueResourcePolicy)(_rule,this.props.deadLetterQueue),{...(0,util_1().bindBaseTargetConfig)(this.props),arn:this.machine.stateMachineArn,role:this.role,input:this.props.input,targetResource:this.machine}}}exports.SfnStateMachine=SfnStateMachine,_a=JSII_RTTI_SYMBOL_1,SfnStateMachine[_a]={fqn:"aws-cdk-lib.aws_events_targets.SfnStateMachine",version:"2.148.1"};
