import{$ as e,C as t,D as n,E as r,I as i,L as a,O as o,Q as s,S as c,U as l,X as u,Z as d,i as f,v as p,w as m,x as h}from"./app-CY4gkrgv.js";import{t as g}from"./i18n-D-Ytq6ze.js";import{n as _}from"./AppLayout-9bv9h8Lc.js";import{t as v}from"./CategoryIcon-BQlfgwdX.js";var y=[`title`],b={class:`min-w-0 flex-1`},x={class:`flex items-center gap-2`},S={key:0,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#e8830c`},C={class:`truncate text-base font-bold tracking-tight`},w={key:1,class:`inline-flex shrink-0 items-center gap-1.5 rounded-full bg-rose-100 px-2.5 py-0.5 text-xs font-bold text-rose-600`},T={class:`mt-1.5 line-clamp-2 text-sm text-ink-2`},E={class:`mt-2.5 flex flex-wrap items-center gap-x-3.5 gap-y-1.5 text-[13px] text-ink-muted`},D={class:`font-semibold text-ink-2`},O={key:1,class:`flex items-center gap-1`},k={class:`font-semibold`},A={class:`hidden shrink-0 flex-col items-end justify-center gap-2 sm:flex`},j={class:`text-center`},M={class:`block text-[15px]`},N={class:`text-[11px] uppercase tracking-wide text-ink-muted`},P=o({__name:`TopicCard`,props:{topic:{}},setup(o){return(P,F)=>(i(),c(u(f),{href:`/t/${o.topic.slug}`,class:d([`q-post relative flex gap-4 rounded-c border bg-surface p-4 shadow-sm transition hover:-translate-y-0.5 hover:border-primary/60 hover:shadow-md`,o.topic.isNew?`border-primary/40`:`border-line`])},{default:l(()=>[o.topic.isNew?(i(),m(`span`,{key:0,class:`absolute -right-1.5 -top-1.5 z-10 inline-flex items-center rounded-full bg-primary px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white shadow-md shadow-primary/30`,title:u(g)(`New posts since your last visit`)},e(u(g)(`New`)),9,y)):t(``,!0),n(_,{avatar:o.topic.author,size:52},null,8,[`avatar`]),h(`div`,b,[h(`div`,x,[o.topic.isPinned?(i(),m(`svg`,S,[...F[0]||=[h(`path`,{d:`M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7z`},null,-1)]])):t(``,!0),h(`h3`,C,e(o.topic.title),1),o.topic.isLive?(i(),m(`span`,w,[F[1]||=h(`span`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-rose-500`},null,-1),r(e(u(g)(`LIVE`)),1)])):t(``,!0)]),h(`p`,T,e(o.topic.excerpt),1),h(`div`,E,[o.topic.category?(i(),m(`span`,{key:0,class:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-semibold`,style:s({color:o.topic.category.color,background:o.topic.category.color+`22`})},[n(v,{icon:o.topic.category.icon},null,8,[`icon`]),r(` `+e(o.topic.category.name),1)],4)):t(``,!0),h(`span`,D,e(o.topic.author.name),1),h(`span`,null,`· `+e(o.topic.lastActivity),1),o.topic.reactionTotal?(i(),m(`span`,O,[(i(!0),m(p,null,a(o.topic.reactions.slice(0,3),t=>(i(),m(`span`,{key:t.emoji},e(t.emoji),1))),128)),h(`span`,k,e(o.topic.reactionTotal),1)])):t(``,!0)])]),h(`div`,A,[h(`div`,j,[h(`b`,M,e(o.topic.replyCount),1),h(`span`,N,e(u(g)(`replies`)),1)])])]),_:1},8,[`href`,`class`]))}});export{P as t};