'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 bpSdkQuoteRequestFeesCss = "";
const BpSdkQuoteRequestFeesStyle0 = bpSdkQuoteRequestFeesCss;

const BpSdkQuoteRequestFees = class {
    constructor(hostRef) {
        index.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 index.h("bp-sdk-external-quote-request-fees", { description: this.description, fees: this.fees });
    }
    renderInternal() {
        return (index.h("section", { class: "bp-sdk-quote-request-fees__container", "aria-description": this.description }, this.fees.map((fee) => (index.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) {
        index.registerInstance(this, hostRef);
        this.description = undefined;
        this.price = undefined;
        this.descriptionId = index_esm_min.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 index.h("bp-sdk-external-quote-request-price", { description: this.description, price: this.price });
    }
    renderInternal() {
        return (index.h("div", { class: "bp-sdk-quote-request-price__container" }, index.h("span", { class: "bp-sdk-quote-request-price__description", id: this.descriptionId }, this.description), index.h("span", { class: "bp-sdk-quote-request-price__separator" }, ":"), index.h("span", { class: "bp-sdk-quote-request-price__amount", "aria-labelledby": this.descriptionId }, this.price)));
    }
};
BpSdkQuoteRequestPrice.style = BpSdkQuoteRequestPriceStyle0;

exports.bp_sdk_quote_request_fees = BpSdkQuoteRequestFees;
exports.bp_sdk_quote_request_price = BpSdkQuoteRequestPrice;
