import{$ as e,C as t,D as n,E as r,L as i,Q as a,R as o,S as s,W as c,Z as l,et as u,i as d,k as f,v as p,w as m,x as h}from"./app-CAV_k0tk.js";import{t as g}from"./i18n-CNs07Srl.js";import{n as _}from"./AppLayout-DsKf8YtU.js";import{t as v}from"./CategoryIcon-CN7sMdoo.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=f({__name:`TopicCard`,props:{topic:{}},setup(f){return(P,F)=>(i(),s(l(d),{href:`/t/${f.topic.slug}`,class:a([`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`,f.topic.isNew?`border-primary/40`:`border-line`]),style:e(f.topic.category?.color?{borderLeftWidth:`4px`,borderLeftColor:f.topic.category.color}:{})},{default:c(()=>[f.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:l(g)(`New posts since your last visit`)},u(l(g)(`New`)),9,y)):t(``,!0),n(_,{avatar:f.topic.author,size:52},null,8,[`avatar`]),h(`div`,b,[h(`div`,x,[f.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,u(f.topic.title),1),f.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(u(l(g)(`LIVE`)),1)])):t(``,!0)]),h(`p`,T,u(f.topic.excerpt),1),h(`div`,E,[f.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:e({color:f.topic.category.color,background:f.topic.category.color+`22`})},[n(v,{icon:f.topic.category.icon},null,8,[`icon`]),r(` `+u(f.topic.category.name),1)],4)):t(``,!0),h(`span`,D,u(f.topic.author.name),1),h(`span`,null,`· `+u(f.topic.lastActivity),1),f.topic.reactionTotal?(i(),m(`span`,O,[(i(!0),m(p,null,o(f.topic.reactions.slice(0,3),e=>(i(),m(`span`,{key:e.emoji},u(e.emoji),1))),128)),h(`span`,k,u(f.topic.reactionTotal),1)])):t(``,!0)])]),h(`div`,A,[h(`div`,j,[h(`b`,M,u(f.topic.replyCount),1),h(`span`,N,u(l(g)(`replies`)),1)])])]),_:1},8,[`href`,`class`,`style`]))}});export{P as t};