import{W as s}from"./WidgetChart-CQnj_aQq.js";import{b as d,k as u,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:"WidgetEvolutionSoldeBanque",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,i=["Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],n=p(()=>{const e=Array.isArray(r.data)&&r.data[0]?r.data[0]:null;return e?{labels:i,datasets:[{label:"Solde banque",data:i.map((t,o)=>e[String(o+1)]||0),borderColor:"#3b82f6",backgroundColor:"#3b82f633",tension:.3,fill:!0}]}:{labels:[],datasets:[]}}),l={plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{font:{size:10}}},y:{ticks:{font:{size:10}}}}};return(e,t)=>(d(),u(s,{title:"Évolution solde banque",icon:"pi pi-chart-line",type:"line","chart-data":n.value,options:l,loading:a.loading,error:a.error,editing:a.editing,onRefresh:t[0]||(t[0]=o=>e.$emit("refresh")),onRemove:t[1]||(t[1]=o=>e.$emit("remove"))},null,8,["chart-data","loading","error","editing"]))}};export{k as default};
