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

const bpSdkQuoteRequestFeesCss = "";
const BpSdkQuoteRequestFeesStyle0 = bpSdkQuoteRequestFeesCss;

const BpSdkQuoteRequestFees = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.description = undefined;
        this.fees = [];
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-fees');
        customElements.whenDefined('bp-sdk-external-quote-request-fees').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-fees", { description: this.description, fees: this.fees });
    }
    renderInternal() {
        return (h("section", { class: "bp-sdk-quote-request-fees__container", "aria-description": this.description }, this.fees.map((fee) => (h("bp-sdk-quote-request-price", { description: fee.description, price: fee.amount })))));
    }
};
BpSdkQuoteRequestFees.style = BpSdkQuoteRequestFeesStyle0;

const bpSdkQuoteRequestPriceCss = "";
const BpSdkQuoteRequestPriceStyle0 = bpSdkQuoteRequestPriceCss;

const BpSdkQuoteRequestPrice = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.description = undefined;
        this.price = undefined;
        this.descriptionId = e$(8);
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-price');
        customElements.whenDefined('bp-sdk-external-quote-request-price').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-price", { description: this.description, price: this.price });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-price__container" }, h("span", { class: "bp-sdk-quote-request-price__description", id: this.descriptionId }, this.description), h("span", { class: "bp-sdk-quote-request-price__separator" }, ":"), h("span", { class: "bp-sdk-quote-request-price__amount", "aria-labelledby": this.descriptionId }, this.price)));
    }
};
BpSdkQuoteRequestPrice.style = BpSdkQuoteRequestPriceStyle0;

export { BpSdkQuoteRequestFees as bp_sdk_quote_request_fees, BpSdkQuoteRequestPrice as bp_sdk_quote_request_price };
