package dev.service;

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

import java.util.List;

public class MenuService {

    private MenuItemDao menuItemDao = new MenuItemDao();

    public void showMenu() {

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

        if (menuItems.isEmpty()) {
            System.out.println("Menu is empty.");
            return;
        }

        System.out.println("===== MENU =====");

        for (MenuItem item : menuItems) {
            System.out.println(
                    item.getId() + ". " +
                            item.getName() + " - " +
                            item.getDescription() + " - $" +
                            item.getPrice() + " - " +
                            item.getCategory()
            );
        }
    }
}