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