"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigurationSet=exports.SuppressionReasons=exports.ConfigurationSetTlsPolicy=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var configuration_set_event_destination_1=()=>{var tmp=require("./configuration-set-event-destination");return configuration_set_event_destination_1=()=>tmp,tmp},utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},ses_generated_1=()=>{var tmp=require("./ses.generated");return ses_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},ConfigurationSetTlsPolicy;(function(ConfigurationSetTlsPolicy2){ConfigurationSetTlsPolicy2.REQUIRE="REQUIRE",ConfigurationSetTlsPolicy2.OPTIONAL="OPTIONAL"})(ConfigurationSetTlsPolicy||(exports.ConfigurationSetTlsPolicy=ConfigurationSetTlsPolicy={}));var SuppressionReasons;(function(SuppressionReasons2){SuppressionReasons2.BOUNCES_AND_COMPLAINTS="BOUNCES_AND_COMPLAINTS",SuppressionReasons2.BOUNCES_ONLY="BOUNCES_ONLY",SuppressionReasons2.COMPLAINTS_ONLY="COMPLAINTS_ONLY"})(SuppressionReasons||(exports.SuppressionReasons=SuppressionReasons={}));class ConfigurationSet extends core_1().Resource{static fromConfigurationSetName(scope,id,configurationSetName){class Import extends core_1().Resource{constructor(){super(...arguments),this.configurationSetName=configurationSetName}}return new Import(scope,id)}constructor(scope,id,props={}){super(scope,id,{physicalName:props.configurationSetName});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_ConfigurationSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ConfigurationSet),error}const configurationSet=new(ses_generated_1()).CfnConfigurationSet(this,"Resource",{deliveryOptions:(0,utils_1().undefinedIfNoKeys)({sendingPoolName:props.dedicatedIpPool?.dedicatedIpPoolName,tlsPolicy:props.tlsPolicy}),name:this.physicalName,reputationOptions:(0,utils_1().undefinedIfNoKeys)({reputationMetricsEnabled:props.reputationMetrics}),sendingOptions:(0,utils_1().undefinedIfNoKeys)({sendingEnabled:props.sendingEnabled}),suppressionOptions:(0,utils_1().undefinedIfNoKeys)({suppressedReasons:renderSuppressedReasons(props.suppressionReasons)}),trackingOptions:(0,utils_1().undefinedIfNoKeys)({customRedirectDomain:props.customTrackingRedirectDomain}),vdmOptions:(0,utils_1().undefinedIfNoKeys)({dashboardOptions:props.vdmOptions?.engagementMetrics!==void 0?{engagementMetrics:booleanToEnabledDisabled(props.vdmOptions?.engagementMetrics)}:void 0,guardianOptions:props.vdmOptions?.optimizedSharedDelivery!==void 0?{optimizedSharedDelivery:booleanToEnabledDisabled(props.vdmOptions?.optimizedSharedDelivery)}:void 0})});this.configurationSetName=configurationSet.ref}addEventDestination(id,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_ConfigurationSetEventDestinationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addEventDestination),error}return new(configuration_set_event_destination_1()).ConfigurationSetEventDestination(this,id,{...options,configurationSet:this})}}exports.ConfigurationSet=ConfigurationSet,_a=JSII_RTTI_SYMBOL_1,ConfigurationSet[_a]={fqn:"aws-cdk-lib.aws_ses.ConfigurationSet",version:"2.148.1"};function renderSuppressedReasons(suppressionReasons){if(suppressionReasons)switch(suppressionReasons){case SuppressionReasons.BOUNCES_AND_COMPLAINTS:return["BOUNCE","COMPLAINT"];case SuppressionReasons.BOUNCES_ONLY:return["BOUNCE"];case SuppressionReasons.COMPLAINTS_ONLY:return["COMPLAINT"]}}function booleanToEnabledDisabled(value){return value===!0?"ENABLED":"DISABLED"}
