import { h } from "@stencil/core";
export class BpSdkQuoteRequestPremium {
    constructor() {
        this.annualPrice = undefined;
        this.downpayment = undefined;
        this.installments = undefined;
        this.monthlyPrice = undefined;
        this.price = undefined;
        this.showTotalPremium = undefined;
        this.termLength = undefined;
        this.totalPremium = undefined;
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-premium');
        customElements.whenDefined('bp-sdk-external-quote-request-premium').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-quote-request-premium", { annualPrice: this.annualPrice, downpayment: this.downpayment, installments: this.installments, monthlyPrice: this.monthlyPrice, price: this.price, showTotalPremium: this.showTotalPremium, termLength: this.termLength, totalPremium: this.totalPremium }));
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-premium__container bp-sdk-online-quote__price-container bp-sdk-quote__price-container" }, h("div", { class: "bp-sdk-online-quote__price-body bp-sdk-quote__price-body" }, h("bp-sdk-quote-request-premium-term", { price: this.price, showTotalPremium: this.showTotalPremium, termLength: this.termLength, totalPremium: this.totalPremium }), !!this.monthlyPrice && (h("bp-sdk-quote-request-premium-monthly", { annualPrice: this.annualPrice, downpayment: this.downpayment, installments: this.installments, monthlyPrice: this.monthlyPrice })))));
    }
    static get is() { return "bp-sdk-quote-request-premium"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-premium.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-premium.css"]
        };
    }
    static get properties() {
        return {
            "annualPrice": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Annual price"
                },
                "attribute": "annual-price",
                "reflect": false
            },
            "downpayment": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Downpayment"
                },
                "attribute": "downpayment",
                "reflect": false
            },
            "installments": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Number of installments"
                },
                "attribute": "installments",
                "reflect": false
            },
            "monthlyPrice": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Monthly price"
                },
                "attribute": "monthly-price",
                "reflect": false
            },
            "price": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Price"
                },
                "attribute": "price",
                "reflect": false
            },
            "showTotalPremium": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Show total premium"
                },
                "attribute": "show-total-premium",
                "reflect": false
            },
            "termLength": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Term length"
                },
                "attribute": "term-length",
                "reflect": false
            },
            "totalPremium": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Total Premium"
                },
                "attribute": "total-premium",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
