import { Injectable } from '@angular/core';
import { MENU_ITEMS_1, MENU_ITEMS_2 } from '../mocks/menu-items';
import MenuItem from '../models/menu-item';

@Injectable({
    providedIn: 'root'
})
export class MenuItemService {
    menu_items: Array<MenuItem> = MENU_ITEMS_1.concat(MENU_ITEMS_2);

    constructor() { }

    public async getMenuItemByID(id: string) {
        return this.menu_items.find((menu_item) => menu_item.id === id);
    }
}
