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

const bpSdkVehicleQuestionSetButtonCss = "";
const BpSdkVehicleQuestionSetButtonStyle0 = bpSdkVehicleQuestionSetButtonCss;

const BpSdkVehicleQuestionSetButton = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = e$(8);
        this.buttonDisabled = false;
        this.extraCssClasses = undefined;
        this.cssClasses = 'bp-sdk-vehicle-question-set-button__container';
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-vehicle-question-set-button');
        customElements.whenDefined('bp-sdk-external-vehicle-question-set-button').then(() => {
            this.useExternal = true;
        });
        this.calculateButtonClasses(this.extraCssClasses);
    }
    calculateButtonClasses(extraClasses = '') {
        this.cssClasses = `bp-sdk-vehicle-question-set-button__container ${extraClasses}`;
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-vehicle-question-set-button", { 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"]
    }; }
};
BpSdkVehicleQuestionSetButton.style = BpSdkVehicleQuestionSetButtonStyle0;

export { BpSdkVehicleQuestionSetButton as bp_sdk_vehicle_question_set_button };
