import{resolveComponent as s,withDirectives as g,createElementBlock as m,openBlock as f,normalizeClass as y,createElementVNode as t,normalizeStyle as b,createVNode as i,toDisplayString as a,withCtx as v,renderSlot as h,vShow as w}from"/vue.js";const S=["data-percent"],p={class:"centered progress"},z={class:"label nc-progress-bar"},N=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(e,{emit:c}){const d=c;function o(){d("close-message")}return(r,n)=>{const l=s("nc-icon"),u=s("nc-col");return g((f(),m("div",{class:y(["ui indicating progress",{active:e.active,disabled:e.disabled,top:e.position==="top",bottom:e.position==="bottom",inverted:e.inverted,attached:e.attached,size:e.size,success:e.status==="success",warning:e.status==="warning",error:e.status==="error"}]),style:{width:"100%"},"data-percent":e.percent},[t("div",{class:"bar",style:b("transition-duration: 50ms; display: block; width: "+e.percent+"%")},[t("div",p,a(e.percent+"%"),1),i(u,{class:"nc-end-h"},{default:v(()=>[i(l,{class:"nc-margin-right",icon:"times",style:{"z-index":"1"},onClick:n[0]||(n[0]=k=>o())})]),_:1})],4),t("div",z,[t("span",null,a(e.message),1),h(r.$slots,"default")])],10,S)),[[w,e.message&&e.percent>0]])}}});export{N as default};
