"use strict";const e=require("vue"),c=require("./CdxLabel.cjs"),p=require("./useLabelChecker.js"),u=require("./useSplitAttributes.cjs"),_=require("./_plugin-vue_export-helper.js"),g=e.defineComponent({name:"CdxProgressIndicator",components:{CdxLabel:c},inheritAttrs:!1,props:{showLabel:{type:Boolean,default:!1}},setup(r,{slots:s,attrs:n}){var o;p.useLabelChecker((o=s.default)==null?void 0:o.call(s),n,"CdxProgressIndicator");const i=e.computed(()=>({"cdx-progress-indicator--has-label-visible":r.showLabel})),{rootClasses:l,rootStyle:d,otherAttrs:a}=u(n,i),t=e.useId();return{rootClasses:l,rootStyle:d,progressIndicatorId:t,otherAttrs:a}}}),h={class:"cdx-progress-indicator__indicator"},m=["id"];function f(r,s,n,i,l,d){var t,o;const a=e.resolveComponent("cdx-label");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cdx-progress-indicator",r.rootClasses]),style:e.normalizeStyle(r.rootStyle)},[e.createElementVNode("span",h,[e.createElementVNode("progress",e.mergeProps({id:r.progressIndicatorId,class:"cdx-progress-indicator__indicator__progress"},r.otherAttrs),null,16,m)]),(o=(t=r.$slots).default)!=null&&o.call(t,{})?(e.openBlock(),e.createBlock(a,{key:0,class:"cdx-progress-indicator__label","input-id":r.progressIndicatorId,"visually-hidden":!r.showLabel},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},8,["input-id","visually-hidden"])):e.createCommentVNode("v-if",!0)],6)}const C=_._export_sfc(g,[["render",f]]);module.exports=C;
