1import{d as x,u as y,P as I,an as v,x as f,O as T,f as L,g as C,h as E,w as S,T as V,k as B,i as e,z as g,q as d,e as p,p as _,s as W,_ as z,y as A}from"./Ckyl5VGr.js";import{u as N}from"./BJSo2InZ.js";const P={class:"inline-flex items-center gap-1.5"},F=["disabled","aria-pressed","aria-label","title"],U=250,j=x({__name:"EngagementActions",props:{contentType:{},contentId:{},tone:{default:"default"}},setup(h){const t=h,{t:o}=y(),s=N(),m=I(),b=v();f(()=>[t.contentType,t.contentId,m.isLoggedIn],([c,u,i])=>{i&&u&&s.ensure(c,u)},{immediate:!0});const a=d(()=>s.getFlags(t.contentType,t.contentId)),r=d(()=>s.isInFlight(t.contentType,t.contentId)),l=W(!1);let n=null;f(r,c=>{if(c){if(n)return;n=setTimeout(()=>{l.value=!0,n=null},U)}else n&&(clearTimeout(n),n=null),l.value=!1}),T(()=>{n&&clearTimeout(n)});function k(){if(!m.isLoggedIn){b.open();return}s.toggleWatchlist(t.contentType,t.contentId)}const w=d(()=>t.tone==="onDark"?"bg-black/45 text-white backdrop-blur-sm hover:bg-black/65":"bg-surface/95 text-on-surface backdrop-blur-sm hover:bg-surface border border-subtle");return(c,u)=>{const i=z;return p(),L("div",P,[C("button",{type:"button",class:g(["engagement-chip h-8 w-8 rounded-full flex items-center justify-center transition-all duration-200 active:scale-90",[e(w),e(a).watchlist?"!bg-primary !text-on-primary":"",e(r)?"cursor-wait":"cursor-pointer"]]),disabled:e(r),"aria-pressed":e(a).watchlist,"aria-label":e(a).watchlist?e(o)("account.actions.removeWatchLater",{defaultValue:"ÙØ§Ø¨Ø±Ø¯Ù ÙÛ Ø¯ÙØ§ØªØ±"}):e(o)("account.actions.addWatchLater",{defaultValue:"Ø²ÛØ§Ø¯Ú©Ø±Ø¯Ù Ø¨Û Ø¯ÙØ§ØªØ±"}),title:e(a).watchlist?e(o)("account.actions.removeWatchLater",{defaultValue:"ÙØ§Ø¨Ø±Ø¯Ù ÙÛ Ø¯ÙØ§ØªØ±"}):e(o)("account.actions.addWatchLater",{defaultValue:"Ø²ÛØ§Ø¯Ú©Ø±Ø¯Ù Ø¨Û Ø¯ÙØ§ØªØ±"}),onClick:B(k,["stop","prevent"])},[E(V,{name:"icon-swap",mode:"out-in"},{default:S(()=>[e(l)?(p(),_(i,{key:"spin",name:"lucide:loader-2",size:"14",class:"animate-spin"})):(p(),_(i,{key:e(a).watchlist?"on":"off",name:"lucide:bookmark",size:"16",class:g(e(a).watchlist?"fill-current pop-on":"")},null,8,["class"]))]),_:1})],10,F)])}}}),O=Object.assign(A(j,[["__scopeId","data-v-8335bede"]]),{__name:"UiEngagementActions"});export{O as _};
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.