import { p as proxyCustomElement, H, h, d as Host } from './p-CUAGH_8P.js';

const verdocsProgressBarCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-progress-bar{font-family:\"Inter\", \"Barlow\", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin-right:8px;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}";

const VerdocsProgressBar = /*@__PURE__*/ proxyCustomElement(class VerdocsProgressBar extends H {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        /**
         * Optional label to display above the bar
         */
        this.label = '';
        /**
         * If true, the progress percentage will be displayed above the bar.
         */
        this.showPercent = false;
        /**
         * The current progress value (0-100)
         */
        this.percent = 0;
    }
    render() {
        const widthPercent = Math.ceil((100 * Math.min(this.percent, 100)) / 100);
        console.log('Rendering progress bar', { widthPercent, label: this.label, showPercent: this.showPercent, percent: this.percent });
        return (h(Host, { key: '0fccebe012d4176accce818db93549436353a12b' }, h("div", { key: '866545106432fe477688dbcff60c0416fe7f6eeb', class: "labels" }, this.label && h("div", { key: '8449f4aed2d3071f285dccb88fd05ce1c13e89e2', class: "label" }, this.label), this.showPercent && h("div", { key: '62c472c07786bb1251743554e543b0e64639449d', class: "label" }, this.percent, "%")), h("div", { key: '2eb42e0ebfeab8596a0c08f79b87d8ac132ee243', class: "bar" }, h("div", { key: 'ad6f73e950a0244ebd6b0e91f1846cb490f41767', class: "slider", style: { width: `${widthPercent}%` } }))));
    }
    static get style() { return verdocsProgressBarCss; }
}, [256, "verdocs-progress-bar", {
        "label": [1],
        "showPercent": [4, "show-percent"],
        "percent": [2]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["verdocs-progress-bar"];
    components.forEach(tagName => { switch (tagName) {
        case "verdocs-progress-bar":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, VerdocsProgressBar);
            }
            break;
    } });
}

export { VerdocsProgressBar as V, defineCustomElement as d };
//# sourceMappingURL=p-B4oEvTcO.js.map

//# sourceMappingURL=p-B4oEvTcO.js.map