import { h } from "@stencil/core";
export class BpSdkQuestionSetHeader {
    constructor() {
        this.applicationId = undefined;
        this.code = undefined;
        this.isActive = undefined;
        this.isCompleted = undefined;
        this.name = undefined;
        this.setId = undefined;
        this.setTitle = undefined;
        this.tenantId = undefined;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-question-set-header');
        customElements.whenDefined('bp-sdk-external-question-set-header').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-question-set-header", { applicationId: this.applicationId, code: this.code, isActive: this.isActive, isCompleted: this.isCompleted, name: this.name, setId: this.setId, setTitle: this.setTitle, tenantId: this.tenantId }));
    }
    renderInternal() {
        return h("div", { class: "bp-sdk-question-set-header__container" });
    }
    static get is() { return "bp-sdk-question-set-header"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-question-set-header.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-question-set-header.css"]
        };
    }
    static get properties() {
        return {
            "applicationId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question application form id"
                },
                "attribute": "application-id",
                "reflect": false
            },
            "code": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question set code"
                },
                "attribute": "code",
                "reflect": false
            },
            "isActive": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is Active"
                },
                "attribute": "is-active",
                "reflect": false
            },
            "isCompleted": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is completed"
                },
                "attribute": "is-completed",
                "reflect": false
            },
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question set name"
                },
                "attribute": "name",
                "reflect": false
            },
            "setId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question set id"
                },
                "attribute": "set-id",
                "reflect": false
            },
            "setTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question set title"
                },
                "attribute": "set-title",
                "reflect": false
            },
            "tenantId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Tenant Id"
                },
                "attribute": "tenant-id",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
