import { h, Host } from "@stencil/core";
export class PnMainnavList {
    constructor() {
        this.heading = '';
        this.linkCount = 0;
    }
    hostElement;
    componentWillLoad() {
        this.linkCount = this.hostElement.querySelectorAll(':scope > pn-mainnav-link').length;
    }
    render() {
        return (h(Host, { key: '9a48708097c27c00ae3244b6d7974757717182c3', class: "mainnav-list", role: "list", "data-navlist-itemcount": this.linkCount + '', "data-navlist-showcolumns": (this.linkCount >= 8) + '' }, this.heading ? h("div", { class: "mainnav-list-heading" }, this.heading) : null, h("slot", { key: 'ca8723edd8fbf394adb586da44d07067abf393e4' })));
    }
    static get is() { return "pn-mainnav-list"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-mainnav-list.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-mainnav-list.css"]
        };
    }
    static get properties() {
        return {
            "heading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "heading",
                "reflect": false,
                "defaultValue": "''"
            }
        };
    }
    static get states() {
        return {
            "linkCount": {}
        };
    }
    static get elementRef() { return "hostElement"; }
}
//# sourceMappingURL=pn-mainnav-list.js.map
