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

const bpSdkDriverQuestionSetButtonCss = "";
const BpSdkDriverQuestionSetButtonStyle0 = bpSdkDriverQuestionSetButtonCss;

const BpSdkDriverQuestionSetButton = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = e$(8);
        this.buttonDisabled = false;
        this.extraCssClasses = undefined;
        this.useExternal = false;
        this.cssClasses = 'bp-sdk-driver-question-set-button__container';
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-driver-question-set-button');
        customElements.whenDefined('bp-sdk-external-driver-question-set-button').then(() => {
            this.useExternal = true;
        });
        this.calculateButtonClasses(this.extraCssClasses);
    }
    calculateButtonClasses(extraClasses = '') {
        this.cssClasses = `bp-sdk-driver-question-set-button__container ${extraClasses}`;
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-driver-question-set-button", { class: this.extraCssClasses, text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
    renderInternal() {
        return h("bp-sdk-button", { class: this.cssClasses, text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled });
    }
    static get watchers() { return {
        "extraCssClasses": ["calculateButtonClasses"]
    }; }
};
BpSdkDriverQuestionSetButton.style = BpSdkDriverQuestionSetButtonStyle0;

export { BpSdkDriverQuestionSetButton as bp_sdk_driver_question_set_button };
