import{_ as y}from"./AdminLayout.vue_vue_type_script_setup_true_lang-DtHb-1yq.js";import{_ as k}from"./Button.vue_vue_type_script_setup_true_lang-CKPSvBok.js";import{_ as v}from"./Card.vue_vue_type_script_setup_true_lang-D4PxcbNb.js";import{_ as b}from"./Badge.vue_vue_type_script_setup_true_lang-Ciy8TpTM.js";import{i as C,m as d,b as B,E as a,a as o,e as i,t as m,h as n,v as s,w as l,F as c,g as r,k as S,n as w,s as $}from"./index-DF5uCdwt.js";import"./cn-2dOUpm6k.js";const V={class:"flex bg-[var(--wdot-bg)] border border-[var(--wdot-border)] rounded-lg overflow-hidden"},L=["onClick"],N={class:"grid grid-cols-4 gap-4 mb-6"},P={class:"text-xs text-[var(--wdot-fg-muted)] mb-1"},z={class:"text-2xl font-black"},A={class:"space-y-4"},E={class:"flex justify-between text-sm mb-1.5"},F={class:"font-semibold"},T={class:"text-xs text-[var(--wdot-fg-muted)]"},j={class:"text-[var(--wdot-fg)]"},D={class:"h-3 bg-[var(--wdot-bg-subtle)] rounded-full overflow-hidden"},M={class:"divide-y divide-[var(--wdot-border)]"},O={class:"w-7 h-7 rounded bg-[var(--wdot-bg-subtle)] grid place-items-center font-black text-sm"},Q={class:"flex-1 font-semibold text-sm"},q={class:"text-sm font-bold text-[var(--wdot-color-primary-700)]"},W=C({__name:"Posts",setup(G){const f=$("30d"),x=[{label:"전체 게시글",value:"12,847"},{label:"이번 달 작성",value:"847"},{label:"댓글",value:"34,128"},{label:"추천 합계",value:"8,247"}],u=[{name:"공지사항",posts:24,comments:87,views:18247,color:"var(--wdot-color-error)"},{name:"자유게시판",posts:612,comments:2847,views:84127,color:"var(--wdot-color-primary-600)"},{name:"Q&A",posts:187,comments:612,views:23847,color:"var(--wdot-color-success)"},{name:"갤러리",posts:84,comments:213,views:18247,color:"var(--wdot-color-warning)"},{name:"자료실",posts:47,comments:124,views:12384,color:"#9333ea"}],g=[{name:"박지원",posts:87,comments:234,points:1247,avatarColor:"from-[#fed7aa] to-[#c2410c]"},{name:"김민서",posts:64,comments:187,points:943,avatarColor:"from-[#bfdbfe] to-[#1d4ed8]"},{name:"이서연",posts:52,comments:165,points:812,avatarColor:"from-[#bbf7d0] to-[#15803d]"},{name:"정원균",posts:47,comments:142,points:743,avatarColor:"from-[#fbcfe8] to-[#9d174d]"},{name:"최유진",posts:41,comments:128,points:687,avatarColor:"from-[#fde68a] to-[#a16207]"}],h=Math.max(...u.map(p=>p.posts));return(p,e)=>(d(),B(y,null,{breadcrumb:a(()=>[...e[0]||(e[0]=[r("통계 · ",-1),o("b",null,"게시글",-1)])]),title:a(()=>[...e[1]||(e[1]=[r("게시글 통계",-1)])]),actions:a(()=>[o("div",V,[(d(),i(c,null,m(["7d","30d","90d"],t=>o("button",{key:t,class:w(["px-3 py-1.5 text-xs font-semibold",f.value===t?"bg-[var(--wdot-color-primary-600)] text-white":"text-[var(--wdot-fg-muted)]"]),onClick:_=>f.value=t},s(t),11,L)),64))]),n(l(k),{variant:"outline"},{default:a(()=>[...e[2]||(e[2]=[r("CSV 내보내기",-1)])]),_:1})]),default:a(()=>[o("div",N,[(d(),i(c,null,m(x,t=>n(l(v),{key:t.label},{default:a(()=>[o("div",P,s(t.label),1),o("div",z,s(t.value),1)]),_:2},1024)),64))]),n(l(v),{class:"mb-6"},{header:a(()=>[...e[3]||(e[3]=[o("b",null,"게시판별 활동",-1)])]),default:a(()=>[o("div",A,[(d(),i(c,null,m(u,t=>o("div",{key:t.name},[o("div",E,[o("span",F,s(t.name),1),o("span",T,[e[4]||(e[4]=r(" 글 ",-1)),o("b",j,s(t.posts),1),r(" · 댓글 "+s(t.comments)+" · 조회 "+s(t.views.toLocaleString()),1)])]),o("div",D,[o("div",{class:"h-full rounded-full",style:S({width:t.posts/l(h)*100+"%",background:t.color})},null,4)])])),64))])]),_:1}),n(l(v),null,{header:a(()=>[...e[5]||(e[5]=[o("b",null,"인기 작성자 TOP 5",-1)])]),default:a(()=>[o("div",M,[(d(),i(c,null,m(g,(t,_)=>o("div",{key:t.name,class:"py-3 flex items-center gap-4"},[o("div",O,s(_+1),1),o("span",{class:w(["w-9 h-9 rounded-full bg-gradient-to-br grid place-items-center text-white text-sm font-bold",t.avatarColor])},s(t.name.slice(0,1)),3),o("div",Q,s(t.name),1),n(l(b),{variant:"primary"},{default:a(()=>[r(s(t.posts)+"글",1)]),_:2},1024),n(l(b),{variant:"neutral"},{default:a(()=>[r(s(t.comments)+"댓글",1)]),_:2},1024),o("span",q,s(t.points.toLocaleString())+"p",1)])),64))])]),_:1})]),_:1}))}});export{W as default};
