'use strict';

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

const index = require('./index-ceff47a0.js');
const index_esm_min = require('./index.esm.min-2e158fd8.js');

const bpSdkQuoteRequestButtonCss = "";
const BpSdkQuoteRequestButtonStyle0 = bpSdkQuoteRequestButtonCss;

const BpSdkQuoteRequestButton = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.text = '';
        this.buttonId = index_esm_min.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 index.h("bp-sdk-external-quote-request-button", { buttonId: this.buttonId, buttonDisabled: this.buttonDisabled, text: this.text });
    }
    renderInternal() {
        return (index.h("bp-sdk-button", { class: "bp-sdk-quote-request-button__container", text: this.text, buttonId: this.buttonId, buttonDisabled: this.buttonDisabled }));
    }
};
BpSdkQuoteRequestButton.style = BpSdkQuoteRequestButtonStyle0;

exports.bp_sdk_quote_request_button = BpSdkQuoteRequestButton;
