import{b4 as u,r as s,q as d,j as e,L as m,d as r,p as i,b6 as h,cb as x,cc as p}from"./index-CK33qGU_.js";const j=()=>{const t=u(),c=s.useCallback(()=>window.location.reload(),[]),[a,l]=s.useState(null),o=new URLSearchParams(window.location.search).get("providerName");return s.useEffect(()=>{o||t(d.auth.login),(async()=>{try{if(o!==null){const n=await x.oauthLoginURI(o);window.open(n,"_self")}}catch(n){l(p(n,"OAuth configuration error"))}})()},[t,o]),a===null?e.jsx(m,{}):e.jsxs(r,{flexDirection:"column",alignItems:"center",my:"auto",children:[e.jsxs(i,{fontSize:"22px",mb:"11px",children:["Error logging you in with ",o]}),e.jsx(i,{mb:"40px",children:a==null?void 0:a.message}),e.jsx(r,{children:e.jsx(h,{intent:"secondary",onClick:c,mr:"14px",children:"Reload"})})]})};export{j as default};
