import{r,h as a,H as e,g as o}from"./p-BdVwMG9u.js";import{_ as s,a as l}from"./p-dfXERft2.js";import{B as b}from"./p-ByiN-QjD.js";import{m as i}from"./p-Ba5qjFjW.js";import{b as n}from"./p-DoUUOEu5.js";import{L as t}from"./p-CGYi6koW.js";import{L as g}from"./p-D49COBvb.js";import"./p-B1u-Mq75.js";import"./p-D7M-7v58.js";import"./p-MBsgW7uz.js";import"./p-C20cwFWy.js";import"./p-C22U88Bg.js";const p=class{constructor(a){r(this,a),this.animated=!0,this.isTouch=n.isTouch,this.value=0,this.background="white",this.color="primary"}componentDidRender(){this.updateProgress()}breakpointListener(r){this.updateProgress()}windowResizeListener(){this.updateProgress()}async configChanged(r){this.animated=r.animated}updateProgress(){this.lineEl&&i((()=>{const r=this.el.clientWidth,a=Math.max(0,Math.min(100,this.value));this.lineEl.style.width=r/100*a+"px",100===a?this.lineEl.classList.add("bal-progress-bar__line--full"):this.lineEl.classList.remove("bal-progress-bar__line--full")}))}render(){const r=b.block("progress-bar"),o=r.element("line");return a(e,{key:"3560c076e654839526d357edec7f7d605793d9b0","aria-hidden":"true",class:Object.assign(Object.assign({},r.class()),r.modifier(`background-${this.background}-of-${this.color}`).class())},a("div",{key:"d89c4e6cf2d0c12abd70696606c47f03de988889",class:Object.assign(Object.assign(Object.assign({},o.class()),o.modifier(`color-${this.color}`).class()),o.modifier("animated").class(this.animated)),ref:r=>this.lineEl=r}))}get el(){return o(this)}};s([t(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],p.prototype,"breakpointListener",null),s([g(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],p.prototype,"windowResizeListener",null),p.style=":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-background-purple:var(--bal-color-purple-2);--bal-progress-bar-background-yellow:var(--bal-color-yellow-2);--bal-progress-bar-background-red:var(--bal-color-red-2);--bal-progress-bar-background-green:var(--bal-color-green-2);--bal-progress-bar-line-color-primary:var(--bal-color-primary);--bal-progress-bar-line-color-purple:var(--bal-color-purple-6);--bal-progress-bar-line-color-yellow:var(--bal-color-yellow-6);--bal-progress-bar-line-color-red:var(--bal-color-red-6);--bal-progress-bar-line-color-green:var(--bal-color-green-6);--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-of-primary,.bal-progress-bar--background-white-of-purple,.bal-progress-bar--background-white-of-red,.bal-progress-bar--background-white-of-green,.bal-progress-bar--background-white-of-yellow{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey-of-primary{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar--background-grey-of-purple{background:var(--bal-progress-bar-background-purple)}.bal-progress-bar--background-grey-of-red{background:var(--bal-progress-bar-background-red)}.bal-progress-bar--background-grey-of-green{background:var(--bal-progress-bar-background-green)}.bal-progress-bar--background-grey-of-yellow{background:var(--bal-progress-bar-background-yellow)}.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-color-primary);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}.bal-progress-bar__line--color-purple{background:var(--bal-progress-bar-line-color-purple)}.bal-progress-bar__line--color-yellow{background:var(--bal-progress-bar-line-color-yellow)}.bal-progress-bar__line--color-red{background:var(--bal-progress-bar-line-color-red)}.bal-progress-bar__line--color-green{background:var(--bal-progress-bar-line-color-green)}";export{p as bal_progress_bar}