import { h } from "@stencil/core";
export class BpSdkApplicationLoad {
    constructor() {
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-application-load');
        customElements.whenDefined('bp-sdk-external-application-load').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-application-load", null);
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-application-load__container" }, h("bp-sdk-spinner", null)));
    }
    static get is() { return "bp-sdk-application-load"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-application-load.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-application-load.css"]
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
