import{az as C,bu as I,du as f,ao as a}from"./app-k0jcl5PQ.js";const _={globalIdps(t,o){return{url:`{gateway}/v1/auth/identity-providers?countryCode=${t}&product=${o}`,key:"global:idps"}}},y={countryCode:"us",isFallback:!0};function x(){var i,n;const t=C(I.geoLocation()),o=(n=(i=f.GetQuery())==null?void 0:i.countryCode)==null?void 0:n.toLowerCase();return o?{countryCode:o}:t.hasCompleted&&!t.data?y:t.data}const p="_globalIdpButton_gzfrv_1",h="_globalIdpImage_gzfrv_5",c={globalIdpButton:p,globalIdpImage:h};function v(t){const{idp:o,onClick:i,backgroundColour:n="F8981D",foregroundColour:e="FFF",last:s,isGlobalIdp:l}=t,r=s?"":"mb-3",u={backgroundColor:`#${o.backgroundColour||n}`,color:`#${o.foregroundColour||e}`},d={},b=l?`btn btn-lg btn-outline-dark w-100 ${r} ${c.globalIdpButton}`:`btn btn-lg w-100 ${r}`,g=l?d:u,m=l?`Continue with ${o.name}`:o.name;return a.jsxs("button",{className:b,style:g,onClick:()=>i(o),children:[l&&o.logoUrl&&a.jsx("img",{src:o.logoUrl,className:c.globalIdpImage,alt:`${o.name} logo`}),m]})}const $="_divider_1q6pq_1",k={divider:$};function B(t){var n;const o=((n=t.idps)==null?void 0:n.filter(e=>!!e.visible))||[];if(!o.length)return a.jsx(a.Fragment,{});function i(e){const s=window.location.pathname+window.location.search;let l=`/challenge?idp=${e.id}&redirectUrl=`+encodeURIComponent(s);"attribution"in t&&(l+="&attribution="+encodeURIComponent(t.attribution)),window.location.href=l}return a.jsxs("div",{className:`${t.className?t.className:""}`,children:[a.jsx("div",{className:`my-4 border-bottom position-relative ${k.divider}`}),o.map((e,s)=>a.jsx(v,{idp:e,onClick:"onClick"in t?t.onClick:i,attribution:"attribution"in t?t.attribution:null,isGlobalIdp:!0},s))]})}export{_ as A,B as G,x as u};
//# sourceMappingURL=ClXKCv7P.chunk.js.map
