'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 bpSdkQuoteRequestCoverageItemCss = "";
const BpSdkQuoteRequestCoverageItemStyle0 = bpSdkQuoteRequestCoverageItemCss;

const BpSdkQuoteRequestCoverageItem = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.amount = undefined;
        this.description = undefined;
        this.useExternal = false;
        this.descriptionId = index_esm_min.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 index.h("bp-sdk-external-quote-request-coverage-item", { amount: this.amount, description: this.description });
    }
    renderInternal() {
        return (index.h("div", { class: "bp-sdk-quote-request-coverage-item__container bp-sdk-online-quote__coverage-container bp-sdk-quote__coverage-container" }, index.h("span", { class: "bp-sdk-quote-request-coverage-item__description bp-sdk-online-quote__coverage-desc bp-sdk-quote__coverage-desc" }, this.description), index.h("span", { class: "bp-sdk-quote-request-coverage-item__separator" }, ":"), index.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) {
        index.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 index.h("bp-sdk-external-quote-request-coverage-item-container", { coverage: this.coverage });
    }
    renderInternal() {
        return index.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) {
        index.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 index.h("bp-sdk-external-quote-request-coverage-list", { coverages: this.coverages });
    }
    renderInternal() {
        return (index.h("div", { class: "bp-sdk-quote-request-coverage-list__container bp-sdk-online-quote__coverages bp-sdk-quote__coverages" }, this.coverages.map((coverage) => (index.h("bp-sdk-quote-request-coverage-item-container", { coverage: coverage })))));
    }
};
BpSdkQuoteRequestCoverageList.style = BpSdkQuoteRequestCoverageListStyle0;

exports.bp_sdk_quote_request_coverage_item = BpSdkQuoteRequestCoverageItem;
exports.bp_sdk_quote_request_coverage_item_container = BpSdkQuoteRequestCoverageItemContainer;
exports.bp_sdk_quote_request_coverage_list = BpSdkQuoteRequestCoverageList;
