1import{d as y,aP as h,f as o,g as A,w as f,j as p,k as g,T as B,h as _,i,_ as C,a3 as S,a4 as w,t as D,aT as k,r as M,q as T,L as c,W as x}from"./D38AoUqG.js";import{_ as P}from"./Cet3EeAF.js";import{d as U}from"./CTYDjIpU.js";import{l as G}from"./CivHgodN.js";import"./C6bVK_az.js";import"./C4vUXPhV.js";import"./D-esRT9J.js";const O={class:"flex w-full flex-col"},j={key:0,class:"flex h-40 items-center justify-center"},E={key:1,class:"flex flex-col gap-4"},z=["onClick"],L=y({__name:"MessageOptionsPopup",props:k({place:{},gift:{},comment:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:k(["deleted:message","blocked:sender"],["update:modelValue"]),setup(m,{emit:b}){const u=b,n=h(m,"modelValue"),e=m,a=M(!1),v=T(()=>{var d;return[{text:"ðï¸ Delete message",onClick:async()=>{if(e.comment.id){a.value=!0;try{await U(e.gift.id,e.comment.id),u("deleted:message"),n.value=!1,c("Secret Valentine - Deleted message")}catch(t){x("Secret Valentine",`Deleting message ${t.message}`)}finally{c("Secret Valentine - Deleted message"),a.value=!1}}}},{text:e.comment.ipAddress&&((d=e.gift.blockedAddresses)!=null&&d.includes(e.comment.ipAddress))?"Unblock sender":"ð Block sender",onClick:async()=>{var l,r;const t=e.comment.ipAddress;if(t){c("Secret Valentine - Blocked Sender"),a.value=!0;try{const s=(l=e.gift.blockedAddresses)!=null&&l.includes(t)?(r=e.gift.blockedAddresses)==null?void 0:r.filter(V=>V!==t):[...e.gift.blockedAddresses||[],t];await G({id:e.gift.id,blockedAddresses:s}),u("blocked:sender",s),n.value=!1}catch(s){x("Secret Valentine",`Blocking ${s.message}`)}finally{a.value=!1}}}}]});return(d,t)=>{const l=C,r=P;return o(),A(r,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=s=>n.value=s)},{default:f(()=>[p("div",O,[g(B,{name:"fade",mode:"out-in"},{default:f(()=>[_(a)?(o(),i("div",j,[g(l,{name:"spinner",class:"animate-spin","size-class":"size-16"})])):(o(),i("div",E,[(o(!0),i(S,null,w(_(v),s=>(o(),i("div",{key:s.text,class:"border-light w-full border-b border-solid last:border-none"},[p("div",{class:"flex h-16 w-full cursor-pointer items-center text-start font-bold",onClick:s.onClick},D(s.text),9,z)]))),128))]))]),_:1})])]),_:1},8,["modelValue"])}}}),H=Object.assign(L,{__name:"GiftReadyTypesSecretValentineMessageOptionsPopup"});export{H 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.