import{bo as u,r as t,t as d,j as e,D as m,a as r,f as i,aJ as h,cW as x,cX as f}from"./index-_eM6l4Nf.js";const w=()=>{const n=u(),c=t.useCallback(()=>window.location.reload(),[]),[o,l]=t.useState(null),a=new URLSearchParams(window.location.search).get("providerName");return t.useEffect(()=>{a||n(d.auth.login),(async()=>{try{if(a!==null){const s=await x.oauthLoginURI(a);window.open(s,"_self")}}catch(s){l(f(s,"OAuth configuration error"))}})()},[n,a]),o===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 ",a]}),e.jsx(i,{mb:"40px",children:o==null?void 0:o.message}),e.jsx(r,{children:e.jsx(h,{intent:"secondary",onClick:c,mr:"14px",children:"Reload"})})]})};export{w as default};
