import { Component, Input, EventEmitter, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "primeng-lts/listbox";
import * as i2 from "@angular/forms";
import * as i3 from "primeng-lts/api";
import * as i4 from "@angular/common";
function AlMenuListComponent_ng_template_1_b_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r1 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r1.subtitle);
} }
function AlMenuListComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵtext(2);
    i0.ɵɵtemplate(3, AlMenuListComponent_ng_template_1_b_3_Template, 2, 1, "b", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 5);
    i0.ɵɵelementStart(5, "i", 6);
    i0.ɵɵtext(6, "keyboard_arrow_right");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r1 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", item_r1.title, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.subtitle);
} }
export class AlMenuListComponent {
    constructor() {
        // Array with the items on the checkbox format (AlSelectItem from multi-select-list component)
        this.options = [];
        // Event Emitter with the selected options
        this.onItemSelected = new EventEmitter();
    }
    onMenuItemClicked(event) {
        this.onItemSelected.emit(event.value);
    }
}
/** @nocollapse */ AlMenuListComponent.ɵfac = function AlMenuListComponent_Factory(t) { return new (t || AlMenuListComponent)(); };
/** @nocollapse */ AlMenuListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlMenuListComponent, selectors: [["al-menu-list"]], inputs: { options: "options", selectedItem: "selectedItem" }, outputs: { onItemSelected: "onItemSelected" }, decls: 2, vars: 2, consts: [[3, "options", "ngModel", "ngModelChange", "onClick"], ["pTemplate", "item"], [1, "item-container"], [1, "menu-text"], [4, "ngIf"], [1, "menu-arrow"], [1, "material-icons", "icon"]], template: function AlMenuListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-listbox", 0);
        i0.ɵɵlistener("ngModelChange", function AlMenuListComponent_Template_p_listbox_ngModelChange_0_listener($event) { return ctx.selectedItem = $event; })("onClick", function AlMenuListComponent_Template_p_listbox_onClick_0_listener($event) { return ctx.onMenuItemClicked($event); });
        i0.ɵɵtemplate(1, AlMenuListComponent_ng_template_1_Template, 7, 2, "ng-template", 1);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("options", ctx.options)("ngModel", ctx.selectedItem);
    } }, directives: [i1.Listbox, i2.NgControlStatus, i2.NgModel, i3.PrimeTemplate, i4.NgIf], styles: ["[_nghost-%COMP%]     .ui-listbox-item{border-bottom:1px solid #ededed}[_nghost-%COMP%]     .item-container{display:flex;justify-content:space-between;width:100%;align-items:center}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlMenuListComponent, [{
        type: Component,
        args: [{
                selector: 'al-menu-list',
                templateUrl: './al-menu-list.component.html',
                styleUrls: ['./al-menu-list.component.scss']
            }]
    }], null, { options: [{
            type: Input
        }], onItemSelected: [{
            type: Output
        }], selectedItem: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtbWVudS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhbC9uZy1nZW5lcmljLWNvbXBvbmVudHMvIiwic291cmNlcyI6WyJhbC1tZW51LWxpc3QvYWwtbWVudS1saXN0LmNvbXBvbmVudC50cyIsImFsLW1lbnUtbGlzdC9hbC1tZW51LWxpc3QuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE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