import{c as s,a as t,o as r,i as l,t as n,n as d,x as i,l as m,m as h,A as p,z as u}from"./app-DE5EohoY.js";import{r as x,a as v}from"./ArrowTrendingUpIcon-B4AyfYvR.js";function M(e,a){return r(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"})])}const f={class:"bg-white rounded-xl shadow-soft border border-slate-100 p-6 hover:shadow-lg transition-all duration-200"},y={class:"flex items-start justify-between"},w={class:"flex-1"},k={class:"text-sm font-medium text-slate-600 mb-1"},C={class:"flex items-baseline gap-2"},S={class:"text-3xl font-bold text-slate-900"},_={key:0,class:"text-xs text-slate-500 mt-1"},$={key:0,class:"mt-4 pt-4 border-t border-slate-100"},Z={__name:"StatCard",props:{title:{type:String,required:!0},value:{type:[String,Number],required:!0},trend:{type:String,default:"neutral",validator:e=>["up","down","neutral"].includes(e)},percentage:{type:[String,Number],default:null},color:{type:String,default:"emerald",validator:e=>["emerald","amber","slate","blue"].includes(e)},subtitle:{type:String,default:null}},setup(e){const a=e,c=i(()=>({emerald:{bg:"bg-primary-100",icon:"text-primary-600",gradient:"bg-gradient-islamic"},amber:{bg:"bg-secondary-100",icon:"text-secondary-600",gradient:"bg-gradient-gold"},slate:{bg:"bg-slate-100",icon:"text-slate-600",gradient:"bg-gradient-to-r from-slate-600 to-slate-700"},blue:{bg:"bg-blue-100",icon:"text-blue-600",gradient:"bg-gradient-to-r from-blue-600 to-blue-700"}})[a.color]),g=i(()=>a.trend==="up"?x:v),b=i(()=>a.trend==="up"?"text-emerald-600 bg-emerald-50":a.trend==="down"?"text-red-600 bg-red-50":"text-slate-600 bg-slate-50");return(o,B)=>(r(),s("div",f,[t("div",y,[t("div",w,[t("p",k,n(e.title),1),t("div",C,[t("h3",S,n(e.value),1),e.percentage?(r(),s("span",{key:0,class:d(["inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-semibold",b.value])},[(r(),m(p(g.value),{class:"w-3 h-3"})),h(" "+n(e.percentage)+"% ",1)],2)):l("",!0)]),e.subtitle?(r(),s("p",_,n(e.subtitle),1)):l("",!0)]),o.$slots.icon?(r(),s("div",{key:0,class:d(["p-3 rounded-lg",c.value.bg])},[t("div",{class:d(["w-8 h-8",c.value.icon])},[u(o.$slots,"icon")],2)],2)):l("",!0)]),o.$slots.footer?(r(),s("div",$,[u(o.$slots,"footer")])):l("",!0)]))}};export{Z as _,M as r};
