import{r as t,j as e}from"./vendor-react-wBh_31cN.js";import{r as l,aq as c,G as m,bd as u,be as d}from"./index-BKr2rJhV.js";import{u as h}from"./vendor-router-D1GqFWiT.js";import"./vendor-redux-CJZrIb6x.js";import"./vendor-utils-OeoE2qq_.js";import"./vendor-icons-BUUmD6ht.js";import"./vendor-radix-BRyWS4bQ.js";import"./vendor-grid-CeFlDWv4.js";const A=()=>{const r=h(),n=t.useCallback(()=>window.location.reload(),[]),[a,i]=t.useState(null),o=new URLSearchParams(window.location.search).get("providerName");return t.useEffect(()=>{o||r(l.auth.login),(async()=>{try{if(o!==null){const s=await u.oauthLoginURI(o);window.open(s,"_self")}}catch(s){i(d(s,"OAuth configuration error"))}})()},[r,o]),a===null?e.jsx(c,{}):e.jsxs("div",{className:"flex flex-col items-center my-auto",children:[e.jsxs("h1",{className:"text-xl font-semibold mb-3",children:["Error logging you in with ",o]}),e.jsx("p",{className:"text-sm mb-10",children:a==null?void 0:a.message}),e.jsx("div",{className:"flex",children:e.jsx(m,{variant:"secondary",onClick:n,className:"mr-3.5",children:"Reload"})})]})};export{A as default};
