import { h } from "@stencil/core";
export class BpSdkQuoteRequestProduct {
    constructor() {
        this.limits = [];
        this.name = undefined;
        this.vehicles = [];
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-product');
        customElements.whenDefined('bp-sdk-external-quote-request-product').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-product", { limits: this.limits, name: this.name, vehicles: this.vehicles });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-product__container" }, h("div", { class: "bp-sdk-online-quote__product bp-sdk-quote__product" }, h("h2", { class: "bp-sdk-online-quote__product-name bp-sdk-quote__product-name" }, this.name), h("div", { class: "bp-sdk-online-quote__coverages bp-sdk-quote__coverages" }, h("div", null, h("bp-sdk-quote-request-coverage-list", { coverages: this.limits }), h("bp-sdk-quote-request-vehicle-coverage", { vehicles: this.vehicles }), this.name === 'Commercial Auto' && (h("div", { class: "bp-sdk-quote__coverages-disclaimer-text-container" }, h("span", { class: "bp-sdk-quote__coverages-disclaimer-text" }, "*Coverages differ by state. Any coverage legally required in your state is applied to this quote."))))))));
    }
    static get is() { return "bp-sdk-quote-request-product"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-product.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-product.css"]
        };
    }
    static get properties() {
        return {
            "limits": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "ICoverageLabel[]",
                    "resolved": "ICoverageLabel[]",
                    "references": {
                        "ICoverageLabel": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::ICoverageLabel"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Coverage limits"
                },
                "defaultValue": "[]"
            },
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Carrier name"
                },
                "attribute": "name",
                "reflect": false
            },
            "vehicles": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "ICoverageVehicle[]",
                    "resolved": "ICoverageVehicle[]",
                    "references": {
                        "ICoverageVehicle": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::ICoverageVehicle"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Vehicle coverage limits"
                },
                "defaultValue": "[]"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
