import { AlRoute } from '@al/core';
import { Component, Input, } from '@angular/core';
import { AlNavigationService } from '../../services/al-navigation.service';
import * as i0 from "@angular/core";
import * as i1 from "../../services/al-navigation.service";
import * as i2 from "@angular/common";
const _c0 = function (a0) { return { "activated": a0 }; };
function AlArchipeligo19ContentMenuComponent_ng_container_0_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 3);
    i0.ɵɵlistener("click", function AlArchipeligo19ContentMenuComponent_ng_container_0_ng_container_1_span_1_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r6); const child_r2 = i0.ɵɵnextContext().$implicit; const ctx_r4 = i0.ɵɵnextContext(2); return ctx_r4.dispatch(child_r2, $event); });
    i0.ɵɵelementStart(1, "a", 4);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const child_r2 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵclassMap(child_r2.caption);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0, child_r2.activated));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("href", child_r2.href, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(child_r2.caption);
} }
function AlArchipeligo19ContentMenuComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlArchipeligo19ContentMenuComponent_ng_container_0_ng_container_1_span_1_Template, 3, 8, "span", 2);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const child_r2 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", child_r2.visible);
} }
function AlArchipeligo19ContentMenuComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlArchipeligo19ContentMenuComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 1);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r0.menu.children);
} }
export class AlArchipeligo19ContentMenuComponent {
    // @Input() cursorItem:AlRoute;
    constructor(alNavigation) {
        this.alNavigation = alNavigation;
    }
    ngOnChanges(changes) {
        if ("menu" in changes) {
            //  Refresh!
            this.menu.refresh(true);
        }
    }
    dispatch(route, $event) {
        if ($event) {
            $event.preventDefault();
        }
        route.dispatch();
    }
}
/** @nocollapse */ AlArchipeligo19ContentMenuComponent.ɵfac = function AlArchipeligo19ContentMenuComponent_Factory(t) { return new (t || AlArchipeligo19ContentMenuComponent)(i0.ɵɵdirectiveInject(i1.AlNavigationService)); };
/** @nocollapse */ AlArchipeligo19ContentMenuComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlArchipeligo19ContentMenuComponent, selectors: [["al-archipeligo19-content-menu"]], inputs: { menu: "menu" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [4, "ngFor", "ngForOf"], [3, "class", "ngClass", "click", 4, "ngIf"], [3, "ngClass", "click"], [3, "href"]], template: function AlArchipeligo19ContentMenuComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, AlArchipeligo19ContentMenuComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.menu);
    } }, directives: [i2.NgIf, i2.NgForOf, i2.NgClass], styles: ["[_nghost-%COMP%]{display:block;background:#f6f6f6;border-bottom:2px solid;border-color:#ededed;padding:0;color:#a8a8a8}[_nghost-%COMP%]   span[_ngcontent-%COMP%]{padding:10px 20px;display:inline-block;margin-bottom:-2px}[_nghost-%COMP%]   span[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{color:#535353;text-decoration:none}[_nghost-%COMP%]   span.activated[_ngcontent-%COMP%]{border-bottom:3px solid #ffb840;color:#3c3c3c}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlArchipeligo19ContentMenuComponent, [{
        type: Component,
        args: [{
                selector: 'al-archipeligo19-content-menu',
                templateUrl: './al-archipeligo19-content-menu.component.html',
                styleUrls: ['./al-archipeligo19-content-menu.component.scss']
            }]
    }], function () { return [{ type: i1.AlNavigationService }]; }, { menu: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtYXJjaGlwZWxpZ28xOS1jb250ZW50LW1lbnUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFsL25nLW5hdmlnYXRpb24tY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImxpYi9hcmNoaXBlbGlnbzE5L2NvbnRlbnQtbWVudS9hbC1hcmNoaXBlbGlnbzE5LWNvbnRlbnQtbWVudS5jb21wb25lbnQudHMiLCJsaWIvYXJjaGlwZWxpZ28xOS9jb250ZW50LW1lbnUvYWwtYXJjaGlwZWxpZ28xOS1jb250ZW50LW1lbnUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUNuQyxPQUFPLEVBQ0gsU0FBUyxFQUNULEtBQUssR0FHUixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQzs7Ozs7OztJQ0xyRSwrQkFDSTtJQUQrRix3U0FBZ0M7SUFDL0gsNEJBQXVCO0lBQUEsWUFBaUI7SUFBQSxpQkFBSTtJQUNoRCxpQkFBTzs7O0lBRnFCLCtCQUF5QjtJQUFDLHdFQUE0QztJQUMzRixlQUFtQjtJQUFuQixzREFBbUI7SUFBQyxlQUFpQjtJQUFqQixzQ0FBaUI7O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