"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserPoolIdentityProviderApple=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cognito_generated_1=()=>{var tmp=require("../cognito.generated");return cognito_generated_1=()=>tmp,tmp},user_pool_idp_base_1=()=>{var tmp=require("./private/user-pool-idp-base");return user_pool_idp_base_1=()=>tmp,tmp};class UserPoolIdentityProviderApple extends user_pool_idp_base_1().UserPoolIdentityProviderBase{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cognito_UserPoolIdentityProviderAppleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,UserPoolIdentityProviderApple),error}const scopes=props.scopes??["name"];if(!props.privateKey&&!props.privateKeyValue||props.privateKey&&props.privateKeyValue)throw new Error('Exactly one of "privateKey" or "privateKeyValue" must be configured.');const resource=new(cognito_generated_1()).CfnUserPoolIdentityProvider(this,"Resource",{userPoolId:props.userPool.userPoolId,providerName:"SignInWithApple",providerType:"SignInWithApple",providerDetails:{client_id:props.clientId,team_id:props.teamId,key_id:props.keyId,private_key:props.privateKeyValue?props.privateKeyValue.unsafeUnwrap():props.privateKey,authorize_scopes:scopes.join(" ")},attributeMapping:super.configureAttributeMapping()});this.providerName=super.getResourceNameAttribute(resource.ref)}}exports.UserPoolIdentityProviderApple=UserPoolIdentityProviderApple,_a=JSII_RTTI_SYMBOL_1,UserPoolIdentityProviderApple[_a]={fqn:"aws-cdk-lib.aws_cognito.UserPoolIdentityProviderApple",version:"2.159.0"};
