import{r,h as e,H as a,g as s}from"./p-3d62c8c0.js";import{B as t}from"./p-61996a75.js";import"./p-3eb250a3.js";import{L as o}from"./p-aeb45bbb.js";import"./p-fec51065.js";import"./p-add1e9ec.js";import"./p-d81412d0.js";import"./p-f146219b.js";import"./p-350daa19.js";import"./p-89495e4c.js";const i=class{constructor(e){r(this,e),this.animated=!0,this.value=0,this.background="white"}componentDidRender(){this.updateProgress()}breakpointListener(r){this.updateProgress()}async configChanged(r){this.animated=r.animated}updateProgress(){if(this.lineEl){const r=this.el.clientWidth,e=Math.max(0,Math.min(100,this.value));this.lineEl.style.width=r/100*e+"px",100===e?this.lineEl.classList.add("bal-progress-bar__line--full"):this.lineEl.classList.remove("bal-progress-bar__line--full")}}render(){const r=t.block("progress-bar"),s=r.element("line");return e(a,{class:Object.assign(Object.assign({},r.class()),r.modifier(`background-${this.background}`).class())},e("div",{class:Object.assign(Object.assign({},s.class()),s.modifier("animated").class(this.animated)),ref:r=>this.lineEl=r}))}get el(){return s(this)}};(function(r,e,a,s){var t,o=arguments.length,i=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(r,e,a,s);else for(var n=r.length-1;n>=0;n--)(t=r[n])&&(i=(o<3?t(i):o>3?t(e,a,i):t(e,a))||i);o>3&&i&&Object.defineProperty(e,a,i)})([o()],i.prototype,"breakpointListener",null),i.style={css:":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-line-background:var(--bal-color-primary);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-background);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}"};export{i as bal_progress_bar}