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 v={__name:"WidgetPaieMasseSalariale5Ans",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(t){const r=t,i=p(()=>{const a=Array.isArray(r.data)?r.data:[];return{labels:a.map(e=>String(e.annee??"")),datasets:[{label:"Masse salariale",data:a.map(e=>e.valeur||0),backgroundColor:"#8b5cf6",borderWidth:0}]}}),o={plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{font:{size:10}}},y:{beginAtZero:!0,ticks:{font:{size:10}}}}};return(a,e)=>(l(),d(n,{title:"Masse salariale 5 dernières années",icon:"pi pi-chart-bar",type:"bar","chart-data":i.value,options:o,loading:t.loading,error:t.error,editing:t.editing,onRefresh:e[0]||(e[0]=s=>a.$emit("refresh")),onRemove:e[1]||(e[1]=s=>a.$emit("remove"))},null,8,["chart-data","loading","error","editing"]))}};export{v as default};
