import{W as m}from"./WidgetCard-CLnTgmXL.js";import{_ as f,o as c}from"./index-BxIwIJfy.js";import{b as r,k as g,l as v,d as n,q as y,f as p,t as a,c as l,p as s,y as b}from"./vue-core-Di3IuVqe.js";const k={class:"kpi-content"},S={key:0,class:"kpi-unit"},B={key:0,class:"kpi-subtitle"},C={__name:"WidgetKpiCard",props:{title:{type:String,required:!0},icon:{type:String,default:""},value:{type:[Number,String],default:0},subtitle:{type:String,default:""},unit:{type:String,default:""},format:{type:String,default:"number"},color:{type:String,default:"primary"},loading:{type:Boolean,default:!1},error:{type:String,default:""},editing:{type:Boolean,default:!1}},emits:["refresh","remove"],setup(e){const o=e,d=b(()=>{const t=Number(o.value)||0;return o.format==="integer"?Math.round(t).toLocaleString("fr-FR"):c(t)});return(t,i)=>(r(),g(m,{title:e.title,icon:e.icon,loading:e.loading,error:e.error,editing:e.editing,onRefresh:i[0]||(i[0]=u=>t.$emit("refresh")),onRemove:i[1]||(i[1]=u=>t.$emit("remove"))},{default:v(()=>[n("div",k,[n("div",{class:y(["kpi-value",`kpi-value--${e.color}`])},[p(a(d.value)+" ",1),e.unit?(r(),l("span",S,a(e.unit),1)):s("",!0)],2),e.subtitle?(r(),l("div",B,a(e.subtitle),1)):s("",!0)])]),_:1},8,["title","icon","loading","error","editing"]))}},$=f(C,[["__scopeId","data-v-5b99964b"]]);export{$ as W};
