import{j as a}from"./iframe-p4aYZyoq.js";import"./preload-helper-BDBacUwf.js";const c=({size:e="medium",percent:r=0,bgColorClass:o="colour-platinum",colorClass:t="colour-sea-blue",children:l})=>{let u,n;return r>=50?(n="180deg",u=`${(r-50)*3.6}deg`):(n=`${r*3.6}deg`,u="0deg"),a.jsxs("span",{className:`doughnut-chart--${e} ${o}`,children:[a.jsx("span",{className:`doughnut-chart--${e}__left-wrap`,children:a.jsx("span",{className:`doughnut-chart--${e}__left-wrap__loader ${t}`,style:{transform:`rotate(${u})`}})}),a.jsx("span",{className:`doughnut-chart--${e}__right-wrap`,children:a.jsx("span",{className:`doughnut-chart--${e}__right-wrap__loader ${t}`,style:{transform:`rotate(${n})`}})}),a.jsx("span",{className:`doughnut-chart--${e}__inner-circle`,style:{},children:l||a.jsx("span",{children:`${r}%`})})]})};try{doughnutchart.displayName="doughnutchart",doughnutchart.__docgenInfo={description:"",displayName:"doughnutchart",props:{size:{defaultValue:{value:"medium"},description:"The bubble size (default is medium)",name:"size",required:!1,type:{name:"enum",value:[{value:'"small"'},{value:'"medium"'},{value:'"large"'}]}},colorClass:{defaultValue:{value:"colour-sea-blue"},description:"The chart colour",name:"colorClass",required:!1,type:{name:"string"}},bgColorClass:{defaultValue:{value:"colour-platinum"},description:"The background chart colour",name:"bgColorClass",required:!1,type:{name:"string"}},percent:{defaultValue:{value:"0"},description:"The ratio to be displayed in percent.",name:"percent",required:!1,type:{name:"number"}}}}}catch{}const g={component:c,title:"Visualisation",argTypes:{size:{options:["small","medium","large"],control:{type:"select"}}},args:{percent:100/3,children:"1/3",colorClass:"colour-uniref",bgColorClass:"colour-sky-white"},render:({colorClass:e,bgColorClass:r,children:o,percent:t,size:l})=>a.jsx(c,{percent:t,colorClass:e,bgColorClass:r,size:l,children:o})},s={};var d,i,m;s.parameters={...s.parameters,docs:{...(d=s.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(i=s.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};const _=["DoughnutChart"];export{s as DoughnutChart,_ as __namedExportsOrder,g as default};
