import { r as registerInstance, d as createEvent, h } from './core-b78a8f7e.js';

const NavigationItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.anjNavigationItemSelected = createEvent(this, "anjNavigationItemSelected", 7);
    }
    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 style() { return ".sc-anj-navigation-item-h {\n  display: block;\n  font-size: 0.875rem;\n  font-family: var(--anj-font-family);\n  font-weight: normal;\n  line-height: 1.5;\n  outline: none;\n}\n.sc-anj-navigation-item-h, .sc-anj-navigation-item-h::before, .sc-anj-navigation-item-h::after {\n  -webkit-box-sizing: border-box;\n  box-sizing: border-box;\n  outline: none;\n}\n.sc-anj-navigation-item-h:focus, .sc-anj-navigation-item-h:active, .sc-anj-navigation-item-h *.sc-anj-navigation-item:focus, .sc-anj-navigation-item-h *.sc-anj-navigation-item:active {\n  outline: none;\n}\n.sc-anj-navigation-item-h:not(:last-child) {\n  margin-bottom: 0.5rem;\n}\n[active].sc-anj-navigation-item-h a.sc-anj-navigation-item {\n  color: var(--anj-text);\n}\n[active].sc-anj-navigation-item-h a.sc-anj-navigation-item:hover {\n  text-decoration: none;\n}"; }
};

export { NavigationItem as anj_navigation_item };
