1import{Q as y,l as _,u as b,e as g,g as c,c as a,a as s,b as r,w as d,o as n,k as l,d as i,t as p,h as k}from"./DbfHA8MV.js";import{_ as w}from"./D5trcJRU.js";const h={class:"min-h-screen bg-gray-50 flex items-center justify-center px-4"},R={class:"w-full max-w-xl"},j={class:"p-2 text-center"},M={key:0,class:"space-y-4"},B={key:1,class:"space-y-4"},S={class:"text-neutral-700"},U={class:"font-medium"},C={key:2,class:"space-y-4"},G={key:3,class:"space-y-4"},N={class:"text-red-700"},Y=y({__name:"remove",setup(P){const f=_(),o=c("loading"),u=c(""),v=c("");return b({title:"Remove Project Updates - Revby"}),g(async()=>{var t;const m=String(f.query.t||"").trim();if(!m){o.value="error",u.value="Missing removal token in this link.";return}try{const e=await $fetch("/api/projects/share/remove",{method:"POST",body:{token:m}});v.value=String((e==null?void 0:e.email)||""),o.value=e!=null&&e.removed?"success":"already_removed"}catch(e){o.value="error",u.value=((t=e==null?void 0:e.data)==null?void 0:t.statusMessage)||(e==null?void 0:e.statusMessage)||(e==null?void 0:e.message)||"Invalid or expired link."}}),(m,t)=>{const e=k,x=w;return n(),a("div",h,[s("div",R,[r(x,null,{default:d(()=>[s("div",j,[l(o)==="loading"?(n(),a("div",M,[...t[0]||(t[0]=[s("div",{class:"mx-auto h-10 w-10 animate-spin rounded-full border-b-2 border-brand"},null,-1),s("h1",{class:"text-2xl font-semibold text-neutral-950"},"Removing you from project updates...",-1),s("p",{class:"text-neutral-600"},"Please wait.",-1)])])):l(o)==="success"?(n(),a("div",B,[t[4]||(t[4]=s("h1",{class:"text-2xl font-semibold text-neutral-950"},"You have been removed",-1)),s("p",S,[t[1]||(t[1]=i(" You will no longer receive updates for this project at ",-1)),s("span",U,p(l(v)),1),t[2]||(t[2]=i(". ",-1))]),r(e,{to:"/",color:"primary"},{default:d(()=>[...t[3]||(t[3]=[i("Go to Revby",-1)])]),_:1})])):l(o)==="already_removed"?(n(),a("div",C,[t[6]||(t[6]=s("h1",{class:"text-2xl font-semibold text-neutral-950"},"You were already removed",-1)),t[7]||(t[7]=s("p",{class:"text-neutral-700"},"This email is not currently associated with project notifications.",-1)),r(e,{to:"/",color:"primary"},{default:d(()=>[...t[5]||(t[5]=[i("Go to Revby",-1)])]),_:1})])):(n(),a("div",G,[t[9]||(t[9]=s("h1",{class:"text-2xl font-semibold text-neutral-950"},"Unable to remove association",-1)),s("p",N,p(l(u)),1),r(e,{to:"/",color:"primary"},{default:d(()=>[...t[8]||(t[8]=[i("Go to Revby",-1)])]),_:1})]))])]),_:1})])])}}});export{Y as default};
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.