import{j as r}from"./vendor-mui-69397583.js";import{f as c,r as i}from"./vendor-react-ece1c85f.js";import{u as m,E as l,O as o,Q as s}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";const I=()=>{const a=c(),{signInExternal:n}=m(),[p,t]=i.useState(!1),e=new URLSearchParams(window.location.search).get("code");return i.useEffect(()=>{(async()=>{if(e){t(!0);try{await n(4,e),t(!1)}catch{o.push(r.jsx(s,{title:"Login Failed",type:"danger",duration:3e3,children:"There was an issue signing in. Please try again."}),{placement:"top-center"}),a("/sign-in"),t(!1)}}else o.push(r.jsx(s,{title:"Error",type:"danger",duration:2500,children:"No authorization code provided."}),{placement:"top-center"}),a("/sign-in"),t(!1)})()},[e]),r.jsx("div",{children:r.jsx(l,{loading:p})})};export{I as default};
