import { r as registerInstance, h } from './index-77a9c9e7.js';

const bpSdkProgressCss = "";
const BpSdkProgressStyle0 = bpSdkProgressCss;

const BpSdkProgress = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.label = undefined;
        this.value = undefined;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-progress');
        customElements.whenDefined('bp-sdk-external-progress').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-progress", { label: this.label, value: this.value });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-progress__container" }, h("progress", { class: "bp-sdk-progress__bar", value: this.value, "aria-label": this.label })));
    }
};
BpSdkProgress.style = BpSdkProgressStyle0;

export { BpSdkProgress as bp_sdk_progress };
