import { r as registerInstance, h } from './index-77a9c9e7.js';

const bpSdkCreateAppFormCss = "";
const BpSdkCreateAppFormStyle0 = bpSdkCreateAppFormCss;

const BpSdkCreateAppForm = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.createAppFormHandler = undefined;
        this.buttonDisabled = false;
        this.text = 'Create New App Form';
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-create-app-form');
        customElements.whenDefined('bp-sdk-external-create-app-form').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-create-app-form", { buttonDisabled: this.buttonDisabled, createAppFormHandler: this.createAppFormHandler, text: this.text }));
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-create-app-form__container" }, h("bp-sdk-create-app-form-button", { text: this.text, buttonDisabled: this.buttonDisabled, onClick: this.createAppFormHandler })));
    }
};
BpSdkCreateAppForm.style = BpSdkCreateAppFormStyle0;

export { BpSdkCreateAppForm as bp_sdk_create_app_form };
