'use strict';

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

const index = require('./index-ceff47a0.js');

const bpSdkNextButtonCss = "";
const BpSdkNextButtonStyle0 = bpSdkNextButtonCss;

const BpSdkNextButton = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.navigateNext = index.createEvent(this, "navigateNext", 7);
        this.text = '';
        this.icon = 'chevron-right';
        this.buttonDisabled = false;
        this.cssClasses = undefined;
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-next-button');
        customElements.whenDefined('bp-sdk-external-next-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (index.h("bp-sdk-external-next-button", { buttonDisabled: this.buttonDisabled, cssClasses: this.cssClasses, icon: this.icon, text: this.text }));
    }
    renderInternal() {
        return (index.h("div", { class: "bp-sdk-next-button__container" }, index.h("bp-sdk-button", { onClick: () => this.navigateNext.emit(), text: this.text, buttonDisabled: this.buttonDisabled, class: this.cssClasses }, index.h("bp-sdk-icon-container", { name: this.icon }))));
    }
};
BpSdkNextButton.style = BpSdkNextButtonStyle0;

exports.bp_sdk_next_button = BpSdkNextButton;
