import { h } from "@stencil/core";
export class BpSdkQuoteRequestProductList {
    constructor() {
        this.products = [];
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-product-list');
        customElements.whenDefined('bp-sdk-external-quote-request-product-list').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-product-list", { products: this.products });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-product-list__container bp-sdk-online-quote__products bp-sdk-quote__products" }, this.products.map((product) => (h("bp-sdk-quote-request-product-container", { product: product })))));
    }
    static get is() { return "bp-sdk-quote-request-product-list"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-product-list.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-product-list.css"]
        };
    }
    static get properties() {
        return {
            "products": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IProduct[]",
                    "resolved": "IProduct[]",
                    "references": {
                        "IProduct": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::IProduct"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Product list"
                },
                "defaultValue": "[]"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
