'use strict';

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

const index = require('./index-ceff47a0.js');
const index_esm_min = require('./index.esm.min-2e158fd8.js');

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

const BpSdkCreateAppFormButton = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = index_esm_min.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 index.h("bp-sdk-external-create-app-form-button", { text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
    renderInternal() {
        return index.h("bp-sdk-button", { class: "bp-sdk-create-form-button__container", text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
};
BpSdkCreateAppFormButton.style = BpSdkCreateAppFormButtonStyle0;

exports.bp_sdk_create_app_form_button = BpSdkCreateAppFormButton;
