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