'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-ceff47a0.js');

const bpSdkProgressCss = "";
const BpSdkProgressStyle0 = bpSdkProgressCss;

const BpSdkProgress = class {
    constructor(hostRef) {
        index.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 index.h("bp-sdk-external-progress", { label: this.label, value: this.value });
    }
    renderInternal() {
        return (index.h("div", { class: "bp-sdk-progress__container" }, index.h("progress", { class: "bp-sdk-progress__bar", value: this.value, "aria-label": this.label })));
    }
};
BpSdkProgress.style = BpSdkProgressStyle0;

exports.bp_sdk_progress = BpSdkProgress;
