import { h } from "@stencil/core";
export class BpSdkBusinessClassificationSelectorNaicsGroupHeader {
    constructor() {
        this.naicsCode = undefined;
        this.naicsDescription = '';
        this.naicsExplanation = '';
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-business-classification-selector-naics-group-header');
        customElements.whenDefined('bp-sdk-external-business-classification-selector-naics-group-header').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-business-classification-selector-naics-group-header", { naicsCode: this.naicsCode, naicsExplanation: this.naicsExplanation, naicsDescription: this.naicsDescription }));
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-business-classification-selector-naics-group-header__container" }, h("h2", { class: "bp-sdk-business-classification-selector-naics-group-header__heading" }, this.naicsDescription, this.naicsCode && (h("span", { class: "bp-sdk-business-classification-selector-naics-group-header__heading--code" }, " - ", this.naicsCode)), this.naicsExplanation && (h("span", { class: "bp-sdk-business-classification-selector-naics-group-header__heading--popover" }, this.naicsExplanation)))));
    }
    static get is() { return "bp-sdk-business-classification-selector-naics-group-header"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-business-classification-selector-naics-group-header.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-business-classification-selector-naics-group-header.css"]
        };
    }
    static get properties() {
        return {
            "naicsCode": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "NAICS code for this group"
                },
                "attribute": "naics-code",
                "reflect": false
            },
            "naicsDescription": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "NAICS description for this group"
                },
                "attribute": "naics-description",
                "reflect": false,
                "defaultValue": "''"
            },
            "naicsExplanation": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "NAICS explanation for this group\nThis is hidden from displaying by default via CSS. The intention is to show it in a hover or popover"
                },
                "attribute": "naics-explanation",
                "reflect": false,
                "defaultValue": "''"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
