import{W as n}from"./WidgetChart-CQnj_aQq.js";import{b as l,k as d,y as p}from"./vue-core-Di3IuVqe.js";import"./WidgetCard-CLnTgmXL.js";import"./primevue-CfIk0_DY.js";import"./index-BxIwIJfy.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";const k={__name:"WidgetDepensesParMois",props:{data:{type:[Array,Object,null],default:null},loading:{type:Boolean,default:!1},error:{type:String,default:""},editing:{type:Boolean,default:!1}},emits:["refresh","remove"],setup(r){const a=r,o=p(()=>{const t=Array.isArray(a.data)?a.data:[];return{labels:t.map(e=>e.mois||""),datasets:[{label:"Dépenses",data:t.map(e=>e.montant||0),backgroundColor:"#ef4444",borderWidth:0}]}}),i={plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{font:{size:10}}},y:{beginAtZero:!0,ticks:{font:{size:10}}}}};return(t,e)=>(l(),d(n,{title:"Dépenses par mois",icon:"pi pi-chart-bar",type:"bar","chart-data":o.value,options:i,loading:r.loading,error:r.error,editing:r.editing,onRefresh:e[0]||(e[0]=s=>t.$emit("refresh")),onRemove:e[1]||(e[1]=s=>t.$emit("remove"))},null,8,["chart-data","loading","error","editing"]))}};export{k as default};
