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

const bpSdkQuoteRequestButtonCss = "";
const BpSdkQuoteRequestButtonStyle0 = bpSdkQuoteRequestButtonCss;

const BpSdkQuoteRequestButton = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = e$(8);
        this.buttonDisabled = false;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-button');
        customElements.whenDefined('bp-sdk-external-quote-request-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-button", { buttonId: this.buttonId, buttonDisabled: this.buttonDisabled, text: this.text });
    }
    renderInternal() {
        return (h("bp-sdk-button", { class: "bp-sdk-quote-request-button__container", text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled }));
    }
};
BpSdkQuoteRequestButton.style = BpSdkQuoteRequestButtonStyle0;

export { BpSdkQuoteRequestButton as bp_sdk_quote_request_button };
