import { h } from "@stencil/core";
export class BpSdkQuoteRequestStatusListContainer {
    constructor() {
        this.quoteStatus = undefined;
        this.useExternal = false;
        this.isConsumerSelected = false;
        this.isExpired = false;
        this.isFocused = false;
        this.isRecommended = false;
        this.isSelected = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-status-list-container');
        customElements.whenDefined('bp-sdk-external-quote-request-status-list-container').then(() => {
            this.useExternal = true;
        });
        this.onQuoteStatusChange(this.quoteStatus);
    }
    onQuoteStatusChange(quoteStatus) {
        this.isConsumerSelected = !!(quoteStatus === null || quoteStatus === void 0 ? void 0 : quoteStatus.consumer_selected);
        this.isExpired = !!(quoteStatus === null || quoteStatus === void 0 ? void 0 : quoteStatus.expired);
        this.isFocused = !!(quoteStatus === null || quoteStatus === void 0 ? void 0 : quoteStatus.focused);
        this.isRecommended = !!(quoteStatus === null || quoteStatus === void 0 ? void 0 : quoteStatus.recommended);
        this.isSelected = !!(quoteStatus === null || quoteStatus === void 0 ? void 0 : quoteStatus.selected);
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-status-list-container", { quoteStatus: this.quoteStatus });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-quote-request-status-list-container__container" }, h("bp-sdk-quote-request-status-list", { isConsumerSelected: this.isConsumerSelected, isExpired: this.isExpired, isFocused: this.isFocused, isRecommended: this.isRecommended, isSelected: this.isSelected })));
    }
    static get is() { return "bp-sdk-quote-request-status-list-container"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-status-list-container.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-status-list-container.css"]
        };
    }
    static get properties() {
        return {
            "quoteStatus": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IQuoteStatus",
                    "resolved": "IQuoteStatus",
                    "references": {
                        "IQuoteStatus": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::IQuoteStatus"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Quote status"
                }
            }
        };
    }
    static get states() {
        return {
            "useExternal": {},
            "isConsumerSelected": {},
            "isExpired": {},
            "isFocused": {},
            "isRecommended": {},
            "isSelected": {}
        };
    }
    static get watchers() {
        return [{
                "propName": "quoteStatus",
                "methodName": "onQuoteStatusChange"
            }];
    }
}
