import { h } from "@stencil/core";
export class NavigationItem {
    onClick(e) {
        e.preventDefault();
        this.anjNavigationItemSelected.emit();
    }
    render() {
        const path = window.location.pathname;
        return (h("anj-headline", null,
            h("h4", null,
                h("a", { href: `${path}#${this.section}`, onClick: (e) => this.onClick(e) },
                    h("slot", null)))));
    }
    static get is() { return "anj-navigation-item"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() { return {
        "$": ["navigation-item.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["navigation-item.css"]
    }; }
    static get properties() { return {
        "active": {
            "type": "any",
            "mutable": false,
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Denotes which item the pane is closest to vertically"
            },
            "attribute": "active",
            "reflect": true
        },
        "section": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "The id the link should anchor to"
            },
            "attribute": "section",
            "reflect": true
        }
    }; }
    static get events() { return [{
            "method": "anjNavigationItemSelected",
            "name": "anjNavigationItemSelected",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": "Emitted when a user clicks the link within"
            },
            "complexType": {
                "original": "void",
                "resolved": "void",
                "references": {}
            }
        }]; }
}
