import{j as e}from"./index-Cdyla_OY.js";import{B as i}from"./button-DrREZEVu.js";import{I as c}from"./misc-DYOOS15_.js";import{u as d,a as m}from"./user-TxUG6Dk7.js";import{u}from"./presence-DUvYSy_d.js";import{u as x,a as h,L as o,F as a}from"./components-B-E6uop2.js";import"./clsx-B-dksMZM.js";import"./index-B8k-Gd1G.js";function O(){const r=x(),l=h(),s=d(),t=m(),n=u();return e.jsxs("main",{className:"container flex h-full w-full max-w-3xl flex-grow flex-col items-center justify-center gap-4",children:[e.jsx("img",{className:"h-36 w-36 rounded-full",alt:(t==null?void 0:t.displayName)??s.name??s.email,src:s.avatarUrl}),e.jsx("h1",{className:"mb-1 text-2xl",children:"Your Account"}),e.jsx("p",{className:"text-center text-gray-700 dark:text-gray-300",children:s.name?`Hi ${(t==null?void 0:t.displayName)??s.name}, your device is logged in with ${s.email}.`:`Your device is logged in with ${s.email}.`}),t?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-center text-gray-700 dark:text-gray-300",children:["And you are connected to discord as ",t.displayName," (",t.id,")."]}),e.jsx(l.Form,{method:"post",className:"mt-2",children:e.jsx(i,{varient:"mono",name:"intent",value:"disconnect-discord",children:"Disconnect Discord"})})]}):e.jsxs(o,{to:r.discordAuthUrl,className:"inline-flex items-center gap-2 underline",children:[e.jsx(c,{name:"Discord",size:"lg"}),"Connect Discord"]}),e.jsxs(a,{method:"POST",children:[e.jsx("input",{name:"optOut",type:"hidden",value:n!=null&&n.optOut?"false":"true"}),e.jsxs(i,{varient:"mono",name:"intent",value:"presence-opt-out",children:[n!=null&&n.optOut?"Opt in to":"Opt out of"," presence"]})]}),e.jsx("p",{children:e.jsxs("small",{children:["Note: it is your ",e.jsx("i",{className:"italic",children:"device"})," that's logged in, not your browser. So all browsers on this device will be logged in with the same account on this device."]})}),e.jsx(a,{method:"post",className:"mt-2",children:e.jsx(i,{varient:"primary",name:"intent",value:"logout",children:"Log out"})}),e.jsxs("p",{children:["Check"," ",e.jsx(o,{to:"/onboarding",className:"underline",children:"/onboarding"})," ","if you'd like to review onboarding again."]}),e.jsxs("p",{children:["Check"," ",e.jsx(o,{to:"/support",className:"underline",children:"/support"})," ","if you need support."]})]})}export{O as default};
//# sourceMappingURL=account-mAjmijrz.js.map
