import { r as registerInstance, h } from './index-77a9c9e7.js';
import { e as e$ } from './index.esm.min-cd800f97.js';

const bpSdkCreateAppFormButtonCss = ":host{display:block}";
const BpSdkCreateAppFormButtonStyle0 = bpSdkCreateAppFormButtonCss;

const BpSdkCreateAppFormButton = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = e$(8);
        this.buttonDisabled = false;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-create-app-form-button');
        customElements.whenDefined('bp-sdk-external-create-app-form-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-create-app-form-button", { text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
    renderInternal() {
        return h("bp-sdk-button", { class: "bp-sdk-create-form-button__container", text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
};
BpSdkCreateAppFormButton.style = BpSdkCreateAppFormButtonStyle0;

export { BpSdkCreateAppFormButton as bp_sdk_create_app_form_button };
