import{C as e,D as t,E as n,F as r,H as i,I as a,L as o,Q as s,S as c,T as l,X as u,Y as d,Z as f,_ as p,b as m,r as h,x as g}from"./app-D8deQlQU.js";import{t as _}from"./i18n-D1nqb1US.js";import{n as v}from"./AppLayout-CDV3MxSe.js";import{t as y}from"./CategoryIcon-3fHiDFri.js";var b=[`title`],x={class:`min-w-0 flex-1`},S={class:`flex items-center gap-2`},C={key:0,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#e8830c`},w={class:`truncate text-base font-bold tracking-tight`},T={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`},E={class:`mt-1.5 line-clamp-2 text-sm text-ink-2`},D={class:`mt-2.5 flex flex-wrap items-center gap-x-3.5 gap-y-1.5 text-[13px] text-ink-muted`},O={class:`font-semibold text-ink-2`},k={key:1,class:`flex items-center gap-1`},A={class:`font-semibold`},j={class:`hidden shrink-0 flex-col items-end justify-center gap-2 sm:flex`},M={class:`text-center`},N={class:`block text-[15px]`},P={class:`text-[11px] uppercase tracking-wide text-ink-muted`},F=t({__name:`TopicCard`,props:{topic:{}},setup(t){return(o,F)=>(r(),g(d(h),{href:`/t/${t.topic.slug}`,class:u([`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:d(_)(`New posts since your last visit`)},s(d(_)(`New`)),9,b)):c(``,!0),n(v,{avatar:t.topic.author,size:52,badge:``},null,8,[`avatar`]),m(`div`,x,[m(`div`,S,[t.topic.isPinned?(r(),e(`svg`,C,[...F[0]||=[m(`path`,{d:`M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7z`},null,-1)]])):c(``,!0),m(`h3`,w,s(t.topic.title),1),t.topic.isLive?(r(),e(`span`,T,[F[1]||=m(`span`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-rose-500`},null,-1),l(s(d(_)(`LIVE`)),1)])):c(``,!0)]),m(`p`,E,s(t.topic.excerpt),1),m(`div`,D,[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:f({color:t.topic.category.color,background:t.topic.category.color+`22`})},[n(y,{icon:t.topic.category.icon},null,8,[`icon`]),l(` `+s(t.topic.category.name),1)],4)):c(``,!0),m(`span`,O,s(t.topic.author.name),1),m(`span`,null,`· `+s(t.topic.lastActivity),1),t.topic.reactionTotal?(r(),e(`span`,k,[(r(!0),e(p,null,a(t.topic.reactions.slice(0,3),t=>(r(),e(`span`,{key:t.emoji},s(t.emoji),1))),128)),m(`span`,A,s(t.topic.reactionTotal),1)])):c(``,!0)])]),m(`div`,j,[m(`div`,M,[m(`b`,N,s(t.topic.replyCount),1),m(`span`,P,s(d(_)(`replies`)),1)])])]),_:1},8,[`href`,`class`]))}}),I={class:`flex flex-col items-center justify-center rounded-2xl border border-dashed border-line px-6 py-14 text-center`},L={key:0,class:`mb-4 grid h-14 w-14 place-items-center rounded-2xl bg-primary/10 text-2xl`},R={class:`text-base font-bold text-ink`},z={key:1,class:`mt-1.5 max-w-sm text-sm text-ink-2`},B={key:2,class:`mt-5 flex flex-wrap items-center justify-center gap-3`},V=t({__name:`EmptyState`,props:{icon:{},title:{},description:{}},setup(t){return(n,i)=>(r(),e(`div`,I,[t.icon?(r(),e(`div`,L,s(t.icon),1)):c(``,!0),m(`h3`,R,s(t.title),1),t.description?(r(),e(`p`,z,s(t.description),1)):c(``,!0),n.$slots.default?(r(),e(`div`,B,[o(n.$slots,`default`)])):c(``,!0)]))}});export{F as n,V as t};