import { h } from "@stencil/core";
export class BpSdkTakeOverButton {
    constructor() {
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-take-over-button');
        customElements.whenDefined('bp-sdk-external-take-over-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-take-over-button", null);
    }
    renderInternal() {
        return h("bp-sdk-button", { class: "bp-sdk-take-over-button__container", text: "Take Over" });
    }
    static get is() { return "bp-sdk-take-over-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-take-over-button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-take-over-button.css"]
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
