import{W as s}from"./WidgetChart-CQnj_aQq.js";import{b as d,k as p,y as m}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 h={__name:"WidgetPaieSalaireNetParMois",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(a){const r=a,o=["Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],n=m(()=>{const e=Array.isArray(r.data)&&r.data[0]?r.data[0]:null;return e?{labels:o,datasets:[{label:"Salaire net",data:o.map((t,i)=>e[String(i+1)]||0),backgroundColor:"#10b981",borderWidth:0}]}:{labels:[],datasets:[]}}),l={plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{font:{size:10}}},y:{beginAtZero:!0,ticks:{font:{size:10}}}}};return(e,t)=>(d(),p(s,{title:"Salaire net par mois",icon:"pi pi-money-bill",type:"bar","chart-data":n.value,options:l,loading:a.loading,error:a.error,editing:a.editing,onRefresh:t[0]||(t[0]=i=>e.$emit("refresh")),onRemove:t[1]||(t[1]=i=>e.$emit("remove"))},null,8,["chart-data","loading","error","editing"]))}};export{h as default};
