import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function AlMenuComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵlistener("click", function AlMenuComponent_div_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r3); const item_r1 = ctx.$implicit; const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.selectedItem(item_r1); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r1 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r1.label, " ");
} }
export class AlMenuComponent {
    constructor() {
        this.options = [];
        this.selectedOption = new EventEmitter();
    }
    ngOnInit() {
    }
    selectedItem(item) {
        this.selectedOption.emit(item);
    }
}
/** @nocollapse */ AlMenuComponent.ɵfac = function AlMenuComponent_Factory(t) { return new (t || AlMenuComponent)(); };
/** @nocollapse */ AlMenuComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlMenuComponent, selectors: [["al2-menu"]], inputs: { options: "options" }, outputs: { selectedOption: "selectedOption" }, decls: 3, vars: 1, consts: [[1, "ald-dropdown-menu"], ["aria-label", "menu", "role", "menu"], ["class", "ald-dropdown-menu__item", "aria-disabled", "false", "role", "menuitem", "tabindex", "0", 3, "click", 4, "ngFor", "ngForOf"], ["aria-disabled", "false", "role", "menuitem", "tabindex", "0", 1, "ald-dropdown-menu__item", 3, "click"]], template: function AlMenuComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtemplate(2, AlMenuComponent_div_2_Template, 2, 1, "div", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", ctx.options);
    } }, directives: [i1.NgForOf], encapsulation: 2 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlMenuComponent, [{
        type: Component,
        args: [{
                selector: 'al2-menu',
                templateUrl: './al-menu.component.html'
            }]
    }], function () { return []; }, { options: [{
            type: Input
        }], selectedOption: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtbWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWwvbmctZ2VuZXJpYy1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsibmV3LWNvbXBvbmVudHMvYWwtbWVudS9hbC1tZW51LmNvbXBvbmVudC50cyIsIm5ldy1jb21wb25lbnRzL2FsLW1lbnUvYWwtbWVudS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztJQ0M3RSw4QkFDQztJQURvSCx3TkFBNEI7SUFDaEosWUFDRDtJQUFBLGlCQUFNOzs7SUFETCxlQUNEO0lBREMsOENBQ0Q7O0FER0YsTUFBTSxPQUFPLGVBQWU7SUFLMUI7UUFIUyxZQUFPLEdBQW1CLEVBQUUsQ0FBQztRQUM1QixtQkFBYyxHQUErQixJQUFJLFlBQVksRUFBRSxDQUFDO0lBRTFELENBQUM7SUFFakIsUUFBUTtJQUNSLENBQUM7SUFFRCxZQUFZLENBQUMsSUFBa0I7UUFDN0IsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDakMsQ0FBQzs7aUdBWlUsZUFBZTt1RUFBZixlQUFlO1FDUDVCLDhCQUNDO1FBQUEsOEJBQ0M7UUFBQSxnRUFDQztRQUVGLGlCQUFNO1FBQ1AsaUJBQU07O1FBSkMsZUFBNEI7UUFBNUIscUN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