import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";const vaProgressBarCss='.usa-sr-only{position:absolute;left:-999em;right:auto}div{-webkit-box-sizing:border-box;box-sizing:border-box}.progress-bar{border:2px solid var(--vads-color-primary);border-radius:1em;display:block;height:1em;margin:1em 0;width:100%}.progress-bar-inner{background-color:var(--vads-color-primary);content:"&nbsp;";display:block;height:100%;max-width:100%}',VaProgressBarStyle0=vaProgressBarCss,VaProgressBar=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.enableAnalytics=!1,this.percent=void 0,this.label=void 0,this.noPercentScreenReader=!1}componentDidRender(){!this.enableAnalytics||0!==this.percent&&100!==this.percent||this.componentLibraryAnalytics.emit({componentName:"va-progress-bar",action:"change",details:{label:this.label||`${this.percent}% complete`,percent:this.percent}})}render(){const{label:e=`${this.percent.toFixed(0)}% complete`,percent:r,noPercentScreenReader:a}=this;return h(Host,{key:"9e48b2af705415d20b4cd6a6914bbc29a2a08ff7"},h("div",{key:"c912b9d9ce4219873c9937ea4f924c9adfa03215","aria-label":e,"aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":r.toFixed(0),"aria-valuetext":e,class:"progress-bar",tabindex:"0",role:"progressbar"},h("div",{key:"25d2392237df08170a4c3de4bc4181cad8ad02a0",class:"progress-bar-inner",style:{width:`${r}%`}})),a?null:h("span",{"aria-atomic":"true","aria-live":"polite",class:"usa-sr-only"},r.toFixed(0),"% complete"))}static get style(){return VaProgressBarStyle0}},[1,"va-progress-bar",{enableAnalytics:[4,"enable-analytics"],percent:[2],label:[1],noPercentScreenReader:[4,"no-percent-screen-reader"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-progress-bar"].forEach(e=>{"va-progress-bar"===e&&(customElements.get(e)||customElements.define(e,VaProgressBar))})}export{VaProgressBar as V,defineCustomElement as d};