import{C as e,D as t,E as n,F as r,H as i,I as a,Q as o,S as s,T as c,X as l,Y as u,Z as d,_ as f,b as p,r as m,x as h}from"./app-Bu_OMixm.js";import{t as g}from"./i18n-B2zUdndG.js";import{n as _}from"./AppLayout-CWask5C1.js";import{t as v}from"./CategoryIcon-D8ia8VZq.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=t({__name:`TopicCard`,props:{topic:{}},setup(t){return(P,F)=>(r(),h(u(m),{href:`/t/${t.topic.slug}`,class:l([`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`,t.topic.isNew?`border-primary/40`:`border-line`])},{default:i(()=>[t.topic.isNew?(r(),e(`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`)},o(u(g)(`New`)),9,y)):s(``,!0),n(_,{avatar:t.topic.author,size:52},null,8,[`avatar`]),p(`div`,b,[p(`div`,x,[t.topic.isPinned?(r(),e(`svg`,S,[...F[0]||=[p(`path`,{d:`M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7z`},null,-1)]])):s(``,!0),p(`h3`,C,o(t.topic.title),1),t.topic.isLive?(r(),e(`span`,w,[F[1]||=p(`span`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-rose-500`},null,-1),c(o(u(g)(`LIVE`)),1)])):s(``,!0)]),p(`p`,T,o(t.topic.excerpt),1),p(`div`,E,[t.topic.category?(r(),e(`span`,{key:0,class:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-semibold`,style:d({color:t.topic.category.color,background:t.topic.category.color+`22`})},[n(v,{icon:t.topic.category.icon},null,8,[`icon`]),c(` `+o(t.topic.category.name),1)],4)):s(``,!0),p(`span`,D,o(t.topic.author.name),1),p(`span`,null,`· `+o(t.topic.lastActivity),1),t.topic.reactionTotal?(r(),e(`span`,O,[(r(!0),e(f,null,a(t.topic.reactions.slice(0,3),t=>(r(),e(`span`,{key:t.emoji},o(t.emoji),1))),128)),p(`span`,k,o(t.topic.reactionTotal),1)])):s(``,!0)])]),p(`div`,A,[p(`div`,j,[p(`b`,M,o(t.topic.replyCount),1),p(`span`,N,o(u(g)(`replies`)),1)])])]),_:1},8,[`href`,`class`]))}});export{P as t};