"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResultWriter=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../../core");return core_1=()=>tmp,tmp},fields_1=()=>{var tmp=require("../../fields");return fields_1=()=>tmp,tmp};class ResultWriter{constructor(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_ResultWriterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ResultWriter),error}this.bucket=props.bucket,this.prefix=props.prefix}render(){const resource=core_1().Arn.format({region:"",account:"",partition:core_1().Aws.PARTITION,service:"states",resource:"s3",resourceName:"putObject",arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME});return fields_1().FieldUtils.renderObject({Resource:resource,Parameters:{Bucket:this.bucket.bucketName,...this.prefix&&{Prefix:this.prefix}}})}providePolicyStatements(){const resource=core_1().Arn.format({region:"",account:"",partition:core_1().Aws.PARTITION,service:"s3",resource:this.bucket.bucketName,resourceName:"*"});return[new(iam()).PolicyStatement({actions:["s3:PutObject","s3:GetObject","s3:ListMultipartUploadParts","s3:AbortMultipartUpload"],resources:[resource]})]}}exports.ResultWriter=ResultWriter,_a=JSII_RTTI_SYMBOL_1,ResultWriter[_a]={fqn:"aws-cdk-lib.aws_stepfunctions.ResultWriter",version:"2.159.0"};
