import { p as proxyCustomElement, H, h, d as Host } from './p-D16h8pzh.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() {
        super();
        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: 'cfccbd59016954d10782723bae6eb451ac8e3e30' }, h("div", { key: 'a0981e9257e56f6c1e207cda99c637bbff85227f', class: "labels" }, this.label && h("div", { key: '5d692917d2a9b0baf1802573e783fdae4efcc35b', class: "label" }, this.label), this.showPercent && h("div", { key: '14a507c2bc3a7474f1d9933fd87b52b8695a52a4', class: "label" }, this.percent, "%")), h("div", { key: '187e0efa73554e681d71bb1d26283e3ab226ca59', class: "bar" }, h("div", { key: '1ec5e3c55c52b0d88cc5da1cec57a24918d8e735', 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-C2M87N-a.js.map

//# sourceMappingURL=p-C2M87N-a.js.map