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) {
    var 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) {
    var item_r1 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", item_r1.title, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.subtitle);
} }
var AlMenuListComponent = /** @class */ (function () {
    function AlMenuListComponent() {
        // 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();
    }
    AlMenuListComponent.prototype.onMenuItemClicked = function (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}"] });
    return AlMenuListComponent;
}());
export { AlMenuListComponent };
/*@__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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtbWVudS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhbC9uZy1nZW5lcmljLWNvbXBvbmVudHMvIiwic291cmNlcyI6WyJhbC1tZW51LWxpc3QvYWwtbWVudS1saXN0LmNvbXBvbmVudC50cyIsImFsLW1lbnUtbGlzdC9hbC1tZW51LWx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