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

const bpSdkQuoteRequestCoverageItemCss = "";
const BpSdkQuoteRequestCoverageItemStyle0 = bpSdkQuoteRequestCoverageItemCss;

const BpSdkQuoteRequestCoverageItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.amount = undefined;
        this.description = undefined;
        this.useExternal = false;
        this.descriptionId = e$(8);
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-coverage-item');
        customElements.whenDefined('bp-sdk-external-quote-request-coverage-item').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-coverage-item", { amount: this.amount, description: this.description });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-coverage-item__container bp-sdk-online-quote__coverage-container bp-sdk-quote__coverage-container" }, h("span", { class: "bp-sdk-quote-request-coverage-item__description bp-sdk-online-quote__coverage-desc bp-sdk-quote__coverage-desc" }, this.description), h("span", { class: "bp-sdk-quote-request-coverage-item__separator" }, ":"), h("span", { class: "bp-sdk-quote-request-coverage-item__amount bp-sdk-online-quote__coverage-value bp-sdk-quote__coverage-value" }, this.amount)));
    }
};
BpSdkQuoteRequestCoverageItem.style = BpSdkQuoteRequestCoverageItemStyle0;

const bpSdkQuoteRequestCoverageItemContainerCss = "";
const BpSdkQuoteRequestCoverageItemContainerStyle0 = bpSdkQuoteRequestCoverageItemContainerCss;

const BpSdkQuoteRequestCoverageItemContainer = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.coverage = undefined;
        this.useExternal = false;
        this.description = undefined;
        this.amount = undefined;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-coverage-item-container');
        customElements.whenDefined('bp-sdk-external-quote-request-coverage-item-container').then(() => {
            this.useExternal = true;
        });
        this.onCoverageChange(this.coverage);
    }
    onCoverageChange(coverage) {
        this.description = coverage === null || coverage === void 0 ? void 0 : coverage.description;
        this.amount = coverage === null || coverage === void 0 ? void 0 : coverage.value;
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-coverage-item-container", { coverage: this.coverage });
    }
    renderInternal() {
        return h("bp-sdk-quote-request-coverage-item", { amount: this.amount, description: this.description });
    }
    static get watchers() { return {
        "coverage": ["onCoverageChange"]
    }; }
};
BpSdkQuoteRequestCoverageItemContainer.style = BpSdkQuoteRequestCoverageItemContainerStyle0;

const bpSdkQuoteRequestCoverageListCss = "";
const BpSdkQuoteRequestCoverageListStyle0 = bpSdkQuoteRequestCoverageListCss;

const BpSdkQuoteRequestCoverageList = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.coverages = [];
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-coverage-list');
        customElements.whenDefined('bp-sdk-external-quote-request-coverage-list').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-coverage-list", { coverages: this.coverages });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-coverage-list__container bp-sdk-online-quote__coverages bp-sdk-quote__coverages" }, this.coverages.map((coverage) => (h("bp-sdk-quote-request-coverage-item-container", { coverage: coverage })))));
    }
};
BpSdkQuoteRequestCoverageList.style = BpSdkQuoteRequestCoverageListStyle0;

export { BpSdkQuoteRequestCoverageItem as bp_sdk_quote_request_coverage_item, BpSdkQuoteRequestCoverageItemContainer as bp_sdk_quote_request_coverage_item_container, BpSdkQuoteRequestCoverageList as bp_sdk_quote_request_coverage_list };
