import{bo as u,r as n,q as d,j as e,D as m,$ as r,f as i,b1 as h,cV as x,cW as f}from"./index-46ma1THH.js";const j=()=>{const t=u(),c=n.useCallback(()=>window.location.reload(),[]),[a,l]=n.useState(null),o=new URLSearchParams(window.location.search).get("providerName");return n.useEffect(()=>{o||t(d.auth.login),(async()=>{try{if(o!==null){const s=await x.oauthLoginURI(o);window.open(s,"_self")}}catch(s){l(f(s,"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};
