1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4627],{4627:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ThirdPartyLoginList:()=>m});var o=r(26514),i=r(59429),l=r(81586),a=r(80254);let n={facebook:{loginUrl:"/connect/facebook?_target_path=/web-api/v1/{locale}/third-party-login",icon:"login-btn-facebook.svg",testId:a.Q.ThirdPartyLoginButtonFacebook},google:{loginUrl:"/connect/google?_target_path=/web-api/v1/{locale}/third-party-login",icon:"login-btn-google.svg",testId:a.Q.ThirdPartyLoginButtonGoogle},apple:{loginUrl:"/connect/apple?_target_path=/web-api/v1/{locale}/third-party-login",icon:"login-btn-apple.svg",testId:a.Q.ThirdPartyLoginButtonApple}};var d=r(17260),g=r(60269),s=r(93090),c=r(55047),u=r(52881),p=r.n(u),_=r(75406);let h=({provider:t,mode:e,destinationLogin:r=null,destinationSignup:i=null,className:a,...u})=>{let{t:h}=(0,c.Bd)("common"),{settings:y}=(0,l.Pj)(),f=(t=>{if(!n[t])throw Error(`Provider ${t} not found`);return n[t].icon??null})(t),b=(t=>{if(!n[t])throw Error(`Provider ${t} not found`);return n[t].testId})(t);return(0,o.jsxs)(g.S,{onClick:((t,e,r=null,o=null)=>()=>{let i=n[t];if(!i)throw Error(`Provider ${t} not found`);let l=window.location.origin,a=`?target_destination=${l}${r||""}_$_${l}${o||""}`;window.location.href=(0,d.c$)(e,`${i.loginUrl.replace("{locale}",e)}${a}`)})(t,y.defaultLocale,r,i),variant:"light",className:(0,_.cn)({"w-full gap-2":!0,[p()[t]]:!0,[`${a}`]:a}),"data-testid":b,...u,children:[f&&(0,o.jsx)(s.k,{src:`/images/third-party-login/${f}`,className:"w-6 h-6","aria-hidden":"true"}),h(`third-party-login-button__${e}__${t}`)]})};var y=r(75834),f=r(46225);let b=[{key:"thirdPartyLoginFailed",messageKey:"third-party-login-list__error_message"},{key:"thirdPartyFacebookEmailRequiredFailed",messageKey:"third-party-login-list__facebook_email_required_error_message"}],m=(0,i.PA)(({mode:t,destinationLogin:e=null,destinationSignup:r=null,className:i})=>{let{t:d}=(0,c.Bd)("common"),g=(()=>{let{settings:t}=(0,l.Pj)();return t.thirdPartyLogins.filter(t=>!!n[t.type])})(),s=(0,f.useRouter)(),{alert:u}=(0,l.Pj)();return 0===g.length?null:((0,y.useEffect)(()=>{s.isReady&&b.forEach(({key:t,messageKey:e})=>{("true"===s.query[t]||"1"===s.query[t])&&u.addAlert({title:d("third-party-login-list__error_title"),message:d(e)})})},[u,s.isReady,s.query,d]),(0,o.jsx)("div",{className:(0,_.cn)({"grid gap-4":!0,[`${i}`]:i}),"data-testid":a.Q.ThirdPartyLoginList,children:g.map(i=>(0,o.jsx)(h,{provider:i.type,mode:t,destinationLogin:e,destinationSignup:r},i.type))}))})},52881:t=>{t.exports={facebook:"ThirdPartyLoginButton_facebook__mvmxG",google:"ThirdPartyLoginButton_google__bHgbM",apple:"ThirdPartyLoginButton_apple__ZUcYM"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.