1import{E as m,n as x,F as u,j as e,f as h,B as o,a as d}from"./main-CGjiTthq.js";import{C as i}from"./circle-x-CN4o74dJ.js";import{C as f}from"./circle-check-big-DwaTQRPc.js";import{M as g}from"./mail-BMYPRmW_.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"620fd87e3b2eb5c765315fb9507beebb7ff50556"};var n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="ea3678ca-92cd-42f0-afb8-192e270e8459",t._sentryDebugIdIdentifier="sentry-dbid-ea3678ca-92cd-42f0-afb8-192e270e8459")}catch{}})();function v(){const{id:t}=m.useSearch(),{data:n,isLoading:r,error:l}=x({...u(t??""),enabled:!!t});if(!t)return e.jsxs(s,{children:[e.jsx(i,{className:"h-10 w-10 text-danger-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Invalid Invitation Link"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This link doesn't contain a valid invitation. Please check the link from your email and try again."})]});if(r)return e.jsxs(s,{children:[e.jsx(h,{className:"h-8 w-8 animate-spin text-primary-500 mx-auto"}),e.jsx("p",{className:"text-muted-foreground mt-4",children:"Loading invitationâ¦"})]});if(l)return e.jsxs(s,{children:[e.jsx(i,{className:"h-10 w-10 text-danger-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Something Went Wrong"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't load this invitation. Please try again later."})]});if(n?.error)return e.jsxs(s,{children:[n.error==="not_found"&&e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"h-10 w-10 text-danger-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Invitation Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This invitation doesn't exist or has been revoked."})]}),n.error==="already_accepted"&&e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"h-10 w-10 text-success-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Already Accepted"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This invitation has already been accepted."}),e.jsx(o,{asChild:!0,className:"mt-6",children:e.jsx(d,{to:"/login",children:"Sign In to Continue"})})]}),n.error==="expired"&&e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"h-10 w-10 text-warning-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Invitation Expired"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This invitation has expired. Ask the organization owner to send a new one."})]})]});const a=n?.invitation;if(!a)return e.jsxs(s,{children:[e.jsx(i,{className:"h-10 w-10 text-danger-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"Something Went Wrong"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Unable to load invitation details. Please try again later."})]});const c=`/confirm-invitation?id=${t}`;return e.jsxs(s,{children:[e.jsx(g,{className:"h-10 w-10 text-primary-500 mx-auto"}),e.jsx("h1",{className:"text-xl font-semibold mt-4",children:"You've Been Invited!"}),e.jsxs("p",{className:"text-muted-foreground mt-2",children:[e.jsx("span",{className:"font-medium text-foreground",children:a.inviterName})," invited you to join ",e.jsx("span",{className:"font-medium text-foreground",children:a.orgName})," as a"," ",e.jsx("span",{className:"font-medium capitalize text-foreground",children:a.role}),"."]}),e.jsxs("p",{className:"text-muted-foreground mt-1",children:["Sign in with ",e.jsx("span",{className:"font-medium text-foreground",children:a.email})," to accept this invitation."]}),e.jsx(o,{asChild:!0,className:"mt-6",children:e.jsx(d,{to:"/login",search:{redirect:c,email:a.email},children:"Sign In"})})]})}function s({children:t}){return e.jsx("div",{className:"bg-neutral-50 rounded-xl shadow-sm border border-neutral-200 p-8 w-full text-center",children:t})}export{v as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.