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

const transactionToastProgressCss = ".transaction-toast-progress{position:relative}.transaction-toast-bar{position:absolute;pointer-events:none;left:-0.5rem;right:-0.5rem;bottom:-0.5rem;top:-0.5rem;background-color:gray;opacity:0.25;transition:width 0.6s ease;max-width:calc(100% + 1rem)}";
const TransactionToastProgressStyle0 = transactionToastProgressCss;

const ToastProgress = /*@__PURE__*/ proxyCustomElement(class ToastProgress extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.progressClass = 'transaction-toast-progress';
        this.currentRemaining = undefined;
    }
    render() {
        if (!this.currentRemaining) {
            return h("slot", null);
        }
        return (h("div", { class: this.progressClass }, h("div", { class: "transaction-toast-bar", style: { width: `${this.currentRemaining}%` }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valnow": this.currentRemaining }), h("slot", null)));
    }
    static get style() { return TransactionToastProgressStyle0; }
}, [1, "transaction-toast-progress", {
        "progressClass": [1, "progress-class"],
        "currentRemaining": [2, "current-remaining"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["transaction-toast-progress"];
    components.forEach(tagName => { switch (tagName) {
        case "transaction-toast-progress":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, ToastProgress);
            }
            break;
    } });
}
defineCustomElement();

export { ToastProgress as T, defineCustomElement as d };

//# sourceMappingURL=p-4d3d1dcb.js.map