import { h } from "@stencil/core";
export class BpSdkQuoteRequestHeader {
    constructor() {
        this.carrier = undefined;
        this.customLogoBaseUrl = undefined;
        this.name = undefined;
        this.showCustomLogo = undefined;
        this.showLogo = undefined;
        this.quoteId = undefined;
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-header');
        customElements.whenDefined('bp-sdk-external-quote-request-header').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-quote-request-header", { carrier: this.carrier, customLogoBaseUrl: this.customLogoBaseUrl, name: this.name, showCustomLogo: this.showCustomLogo, showLogo: this.showLogo, quoteId: this.quoteId }));
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-header__container bp-sdk-online-quote__header bp-sdk-quote__header" }, h("div", { class: "bp-sdk-online-quote__carrier bp-sdk-quote__carrier" }, h("h1", { class: "bp-sdk-online-quote__carrier-name bp-sdk-quote__carrier-name" }, this.name), h("bp-sdk-quote-request-logo-container", { carrier: this.carrier, customLogoBaseUrl: this.customLogoBaseUrl, showCustomLogo: this.showCustomLogo, showLogo: this.showLogo, quoteId: this.quoteId }))));
    }
    static get is() { return "bp-sdk-quote-request-header"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-header.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-header.css"]
        };
    }
    static get properties() {
        return {
            "carrier": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "ICarrier",
                    "resolved": "ICarrier",
                    "references": {
                        "ICarrier": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::ICarrier"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Carrier"
                }
            },
            "customLogoBaseUrl": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Custom logo base url"
                },
                "attribute": "custom-logo-base-url",
                "reflect": false
            },
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Carrier name"
                },
                "attribute": "name",
                "reflect": false
            },
            "showCustomLogo": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Should show custom logo"
                },
                "attribute": "show-custom-logo",
                "reflect": false
            },
            "showLogo": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Should show logo"
                },
                "attribute": "show-logo",
                "reflect": false
            },
            "quoteId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Quote ID"
                },
                "attribute": "quote-id",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
