import { h } from "@stencil/core";
export class BpSdkAccumulationQuestionGroupContainer {
    constructor() {
        this.answers = undefined;
        this.label = undefined;
        this.labelledBy = undefined;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-accumulation-question-group-container');
        customElements.whenDefined('bp-sdk-external-accumulation-question-group-container').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-accumulation-question-group-container", { answers: this.answers, label: this.label, labelledBy: this.labelledBy });
    }
    renderInternal() {
        return h("bp-sdk-accumulation-question-group", { answers: this.answers, label: this.label, labelledBy: this.labelledBy });
    }
    static get is() { return "bp-sdk-accumulation-question-group-container"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-accumulation-question-group-container.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-accumulation-question-group-container.css"]
        };
    }
    static get properties() {
        return {
            "answers": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IAnswer[]",
                    "resolved": "IAnswer[]",
                    "references": {
                        "IAnswer": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::IAnswer"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Answers"
                }
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "label"
                },
                "attribute": "label",
                "reflect": false
            },
            "labelledBy": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Labels that describe group"
                },
                "attribute": "labelled-by",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
