import{W as l}from"./WidgetChart-CQnj_aQq.js";import{b as d,k as p,y as f}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:"WidgetPaieNombreEmployesParAnnee",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=["Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],n=f(()=>{const e=Array.isArray(a.data)&&a.data[0]?a.data[0]:null;return e?{labels:o,datasets:[{label:"Effectif",data:o.map((t,i)=>e[String(i+1)]||0),backgroundColor:"#6366f1",borderWidth:0}]}:{labels:[],datasets:[]}}),s={plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{font:{size:10}}},y:{beginAtZero:!0,ticks:{font:{size:10},precision:0}}}};return(e,t)=>(d(),p(l,{title:"Effectif mensuel",icon:"pi pi-users",type:"bar","chart-data":n.value,options:s,loading:r.loading,error:r.error,editing:r.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};
