import{v as e}from"./nc-util.BWncs0l6.js";import{computed as t,createElementBlock as n,createElementVNode as r,createVNode as i,normalizeClass as a,normalizeStyle as o,openBlock as s,renderSlot as c,resolveComponent as l,toDisplayString as u,unref as d,vShow as f,withCtx as p,withDirectives as m}from"/vue.js";var h=[`data-percent`],g={class:`centered progress`},_={class:`label nc-progress-bar`},v=Object.assign({name:`NcProgressBar`},{__name:`nc-progress-bar`,props:{message:{type:String,default:void 0},percent:{type:Number,default:0},active:{type:String,default:void 0},disabled:{type:String,default:void 0},position:{type:String,allowed:[`top`,`bottom`],default:void 0},inverted:{type:String,default:void 0},attached:{type:String,default:void 0},size:{type:String,allowed:[`tiny`,`small`,`large`,`big`],default:void 0,description:`Progress size.`},status:{type:String,allowed:[`success`,`warning`,`error`],default:void 0,description:`status shows color.`}},emits:[`close-message`],setup(v,{emit:y}){let b=y,x=v,S=t(()=>e(x.percent,2)+`%`);function C(){b(`close-message`)}return(e,t)=>{let y=l(`nc-icon`),b=l(`nc-col`);return m((s(),n(`div`,{class:a([`ui indicating progress`,{active:v.active,disabled:v.disabled,top:v.position===`top`,bottom:v.position===`bottom`,inverted:v.inverted,attached:v.attached,size:v.size,success:v.status===`success`,warning:v.status===`warning`,error:v.status===`error`}]),style:{width:`100%`},"data-percent":v.percent},[r(`div`,{class:`bar`,style:o(`transition-duration: 50ms; display: block; width: `+v.percent+`%`)},[r(`div`,g,u(d(S)),1),i(b,{class:`nc-end-h`},{default:p(()=>[i(y,{class:`nc-margin-right`,icon:`times`,style:{"z-index":`1`},onClick:t[0]||(t[0]=e=>C())})]),_:1})],4),r(`div`,_,[r(`span`,null,u(v.message),1),c(e.$slots,`default`)])],10,h)),[[f,v.message]])}}});export{v as default};