import{o as e}from"./chunk-CFjPhJqf.js";import{i as t,r as n}from"./bundle-mjs-DuVun8J2.js";import{c as r,t as i}from"./chunk-LFPYN7LY-Dq4q0Zxd.js";import{n as a,t as o}from"./use-reduced-motion-CXc1Gmc_.js";import{l as s,t as c}from"./button-DbPycOZU.js";import"./client-CfJnSvcd.js";import{Rt as l,Yt as u,at as d,dt as f,fn as p,ft as m,gn as h,ht as g,it as _,mt as v,pt as y,rt as b,ut as x}from"./index-BZmR4FtW.js";var S=s(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),C=e(t(),1),w=n();function T(){let e=r(),t=l(),n=o(),[s,T]=(0,C.useState)(`signing-out`);return(0,C.useEffect)(()=>{t.capture(`user_logged_out`),t.reset();let e=!1,n=null;return h().catch(()=>void 0).then(()=>{e||(n=setTimeout(()=>{T(`done`)},500))}),()=>{e=!0,n&&clearTimeout(n)}},[t]),(0,w.jsx)(`div`,{className:`flex min-h-dvh items-center justify-center bg-background px-4`,children:(0,w.jsx)(x,{className:`w-full max-w-100 shadow-(--shadow-200-stronger)`,children:(0,w.jsx)(p,{mode:`wait`,children:s===`signing-out`?(0,w.jsxs)(a.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:n?b.instant:b.fast,className:`flex flex-col gap-5`,children:[(0,w.jsxs)(v,{className:`items-center text-center`,children:[(0,w.jsx)(d,{className:`h-3.75 w-8 text-foreground`}),(0,w.jsxs)(`div`,{className:`space-y-1`,children:[(0,w.jsx)(g,{className:`text-foreground typo-h3`,children:`Signing you out`}),(0,w.jsx)(m,{className:`typo-caption`,children:`Clearing your local session and closing the current workspace.`})]})]}),(0,w.jsxs)(f,{className:`flex flex-col items-center gap-3 pb-8`,children:[(0,w.jsx)(a.div,{animate:n?void 0:{rotate:360},transition:n?_.instant:{duration:1,repeat:1/0,ease:`linear`},className:`rounded-full-token h-6 w-6 border-2 border-muted-foreground border-t-foreground`}),(0,w.jsx)(`p`,{className:`text-muted-foreground typo-caption`,children:`Signing you out…`})]})]},`signing-out`):(0,w.jsxs)(a.div,{initial:{opacity:0,y:n?0:8},animate:{opacity:1,y:0},transition:n?_.instant:_.default,className:`flex flex-col gap-5`,children:[(0,w.jsxs)(v,{className:`items-center text-center`,children:[(0,w.jsx)(d,{className:`h-3.75 w-8 text-foreground`}),(0,w.jsx)(`div`,{className:`rounded-token flex h-12 w-12 items-center justify-center bg-muted`,children:(0,w.jsx)(u,{className:`h-5 w-5 text-muted-foreground`})}),(0,w.jsxs)(`div`,{className:`space-y-1`,children:[(0,w.jsx)(g,{className:`text-foreground typo-h3`,children:`You’ve been signed out`}),(0,w.jsx)(m,{className:`typo-caption`,children:`Your session has ended. Sign in again to continue.`})]})]}),(0,w.jsxs)(y,{className:`flex flex-col items-stretch gap-3`,children:[(0,w.jsxs)(c,{className:`w-full`,onClick:()=>e(`/login`,{replace:!0}),children:[(0,w.jsx)(`span`,{className:`typo-label`,children:`Sign In`}),(0,w.jsx)(S,{className:`size-4`})]}),(0,w.jsx)(i,{to:`/login`,className:`inline-flex items-center justify-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground typo-caption`,children:`Return to Microsoft sign-in`})]})]},`done`)})})})}export{T as LogoutPage};