import { Injectable } from '@angular/core';
import { MenuItem } from '../models/menu-item.model';

@Injectable({
  providedIn: 'root'
})
export class MenuService {
  private menuItems: MenuItem[] = [
    {
      id: 1,
      name: '西湖醋鱼',
      price: 88,
      description: '杭州传统名菜，鱼肉鲜嫩，酸甜可口',
      rating: 4.9,
      time: 15,
      badge: '掌柜推荐',
      colors: ['#ff9a9e', '#fad0c4']
    },
    {
      id: 2,
      name: '清蒸鲈鱼',
      price: 78,
      description: '粤菜经典，原汁原味，肉质鲜嫩',
      rating: 4.8,
      time: 18,
      badge: '健康优选',
      colors: ['#a1c4fd', '#c2e9fb']
    },
    {
      id: 3,
      name: '宫保鸡丁',
      price: 42,
      description: '川菜代表，麻辣鲜香，鸡肉滑嫩',
      rating: 4.7,
      time: 8,
      badge: '快速出餐',
      colors: ['#ffecd2', '#fcb69f']
    },
    {
      id: 4,
      name: '上汤娃娃菜',
      price: 32,
      description: '健康素菜，汤鲜味美，营养丰富',
      rating: 4.6,
      time: 10,
      badge: '健康优选',
      colors: ['#84fab0', '#8fd3f4']
    }
  ];

  getMenuItems(sortType: string): MenuItem[] {
    // 这里可以根据不同的排序类型返回不同的数据
    return [...this.menuItems];
  }
}