import{bw as u,r as n,s as d,j as e,L as m,B as r,Q as i,aG as h,cB as x,cC as g}from"./index-dP1W1_bd.js";const j=()=>{const t=u(),c=n.useCallback(()=>window.location.reload(),[]),[o,l]=n.useState(null),a=new URLSearchParams(window.location.search).get("providerName");return n.useEffect(()=>{a||t(d.auth.login),(async()=>{try{if(a!==null){const s=await x.oauthLoginURI(a);window.open(s,"_self")}}catch(s){l(g(s,"OAuth configuration error"))}})()},[t,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{j as default};
