import{u as i}from"./preload-helper-iHri5ttz.chunk.mjs";import{n as o}from"./index-DXEYydlG.chunk.mjs";const s={name:"NcProgressBar",props:{value:{type:Number,default:0,validator(r){return r>=0&&r<=100}},size:{type:[String,Number],default:"small",validator(r){return["small","medium"].includes(r)||typeof r=="number"}},error:{type:Boolean,default:!1},type:{type:String,default:"linear",validator(r){return["linear","circular"].includes(r)}},color:{type:String,default:null}},data(){return{stroke:4}},computed:{height(){return this.type==="circular"?Number.isInteger(this.size)?this.size:44:this.size==="small"?4:this.size==="medium"?6:this.size},progress(){return this.value/100},radius(){return this.height/2},radiusNormalized(){return this.radius-3*this.stroke},circumference(){return this.radiusNormalized*2*Math.PI}}},t=()=>{i((r,e)=>({"15a054de":r.color}))},a=s.setup;s.setup=a?(r,e)=>(t(),a(r,e)):t;const u=s;var c=function(){var r=this,e=r._self._c;return r.type==="circular"?e("span",{staticClass:"progress-bar progress-bar--circular",class:{"progress-bar--error":r.error},style:{"--progress-bar-height":r.height+"px"},attrs:{role:"progressbar","aria-valuenow":r.value}},[e("svg",{attrs:{height:r.height,width:r.height}},[e("circle",{attrs:{stroke:"currentColor",fill:"transparent","stroke-dasharray":`${r.progress*r.circumference} ${(1-r.progress)*r.circumference}`,"stroke-dashoffset":.25*r.circumference,"stroke-width":r.stroke,r:r.radiusNormalized,cx:r.radius,cy:r.radius}}),e("circle",{attrs:{stroke:"var(--color-background-darker)",fill:"transparent","stroke-dasharray":`${(1-r.progress)*r.circumference} ${r.progress*r.circumference}`,"stroke-dashoffset":(.25-r.progress)*r.circumference,"stroke-width":r.stroke,r:r.radiusNormalized,cx:r.radius,cy:r.radius}})])]):e("progress",{staticClass:"progress-bar progress-bar--linear vue",class:{"progress-bar--error":r.error},style:{"--progress-bar-height":r.height+"px"},attrs:{max:"100"},domProps:{value:r.value}})},l=[],n=o(u,c,l,!1,null,"06c9abdc");const h=n.exports;export{h as N};
//# sourceMappingURL=NcProgressBar-D7zYeXBH-otMdN8sK.chunk.mjs.map
