package dev.service;

import dev.dao.MenuItemDao;
import dev.model.MenuItem;

import java.util.List;

public class MenuService {

    private final MenuItemDao menuItemDao = new MenuItemDao();

    public void showMenu() {

        // TODO:
        // Display menu items

        List<MenuItem> menuItems = menuItemDao.findAll();

        System.out.println("Available Items:");

        for (MenuItem item : menuItems) {
            System.out.printf("%d. %s - $%.2f%n", item.getId(), item.getName(), item.getPrice());
        }
    }

    public List<MenuItem> getMenu() {

        return menuItemDao.findAll();
    }

}