import{defineComponent as i,mergeModels as c,useModel as n,computed as a,openBlock as u,createElementBlock as p,createElementVNode as m,createVNode as f,unref as h}from"vue";import g from"primevue/chart";const y={class:"flex flex-col gap-1"},w={class:"max-h-[48rem] rounded border p-4"},F=i({__name:"WidgetChart",props:c({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const o=n(r,"modelValue"),l=r,t=a(()=>l.widget.options?.type??"line"),s=a(()=>o.value||{labels:[],datasets:[]}),d=a(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{legend:{labels:{color:"#FFF",usePointStyle:!0,pointStyle:"circle"}}},scales:{x:{ticks:{color:"#9FA2BD"},grid:{display:!0,color:"#9FA2BD",drawTicks:!1,drawOnChartArea:!0,drawBorder:!1},border:{display:!0,color:"#9FA2BD"}},y:{ticks:{color:"#9FA2BD"},grid:{display:!1,drawTicks:!1,drawOnChartArea:!1,drawBorder:!1},border:{display:!0,color:"#9FA2BD"}}}}));return(e,v)=>(u(),p("div",y,[m("div",w,[f(h(g),{type:t.value,data:s.value,options:d.value,"aria-label":`${e.widget.name||e.$t("g.chart")} - ${t.value} ${e.$t("g.chartLowercase")}`},null,8,["type","data","options","aria-label"])])]))}});export{F as default};
//# sourceMappingURL=WidgetChart-u2jEJmJm.js.map
