import{S as u,m as f}from"./vue3-apexcharts-DJaiVsL5.js";import{u as _}from"./index-BzKDSPoe.js";import{a as g,C as v,k as i,b as k,m as C,g as n,f as y,q as S,p as e,u as a,D as x,n as w,I as B}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./analytics-CiIjvCz9.js";/* empty css               */import"./vue-datepicker-DJOolBJW.js";/* empty css             */import"./index-xsH4HHeE.js";const L={class:"ccb-dashboard-card ccb-dashboard-card-chart ccb-pie-chart"},D={class:"ccb-dashboard-chart-header"},I={class:"ccb-dashboard-chart-controls"},N={class:"ccb-dashboard-large-chart ccb-dashboard-large-chart-pie"},W=g({__name:"PieChart",props:{chart:{},page:{}},setup(p){const d=p,{chart:t}=v(d),l=t.value.categories,o=t.value.series,h=i({chart:{type:"pie",width:250},labels:l,legend:{show:!0,position:"left"},dataLabels:{enabled:!0,formatter(s,c){const m=c.seriesIndex;return`${parseInt(s)}% (${o[m]})`},style:{fontSize:"14px",fontWeight:500,position:"center"}},tooltip:{enabled:!0},responsive:[{breakpoint:1440,options:{chart:{width:300,position:"center"},legend:{position:"top"}}}]}),b=i(o),r=k(()=>_().isLoading);return(s,c)=>(n(),C("div",L,[r.value?(n(),y(a(u),{key:0})):S("",!0),e("div",{class:B(["ccb-dashboard-card-wrapper",{"ccb-is-loading":r.value}])},[e("div",D,[e("div",I,[e("span",null,x(a(t).title),1)])]),e("div",N,[w(a(f),{type:"pie",height:"100%",options:h.value,series:b.value},null,8,["options","series"])])],2)]))}});export{W as default};
//# sourceMappingURL=PieChart-BKnEIJdF.js.map
