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() {
        List<MenuItem> items = menuItemDao.findAll();
        System.out.println("\n--- MENU ---");
        for (MenuItem item : items) {
            System.out.printf("%d. %s - $%.2f (%s)\n", item.getId(), item.getName(), item.getPrice(), item.getCategory());
            if (item.getDescription() != null && !item.getDescription().isEmpty()) {
                System.out.println("   " + item.getDescription());
            }
        }
        System.out.println("------------");
    }
}