import { Component } from '@angular/core';
import {
  IonHeader,
  IonToolbar,
  IonTitle,
  IonContent,
  IonButton,
  IonIcon,
  IonCard,
  IonCardHeader,
  IonCardTitle,
  IonCardContent,
  IonList,
  IonItem,
  IonLabel,
  IonNote,
  IonGrid,
  IonRow,
  IonCol,
  IonFooter,
  IonButtons,
  IonImg,
  IonCardSubtitle
} from '@ionic/angular/standalone';

import { CommonModule } from '@angular/common';  // 确保导入 CommonModule

@Component({
  selector: 'app-tab1',
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss'],
  standalone: true,
  imports: [
    IonHeader,
    IonToolbar,
    IonTitle,
    IonContent,
    IonButton,
    IonIcon,
    IonCard,
    IonCardHeader,
    IonCardTitle,
    IonCardContent,
    IonList,
    IonItem,
    IonLabel,
    IonNote,
    IonGrid,
    IonRow,
    IonCol,
    IonFooter,
    IonButtons,
    IonImg,
    IonCardSubtitle,
    CommonModule
  ],
})
export class Tab1Page {
  totalDays: number = 30;
  completedDays: number = 6;  // 当前打卡天数

 // 饮食计划数据结构
mealPlan = [
  { meal: '早餐', food: '燕麦片', calories: 200, imageUrl: 's202226701038/seeking-prod/img/yanmai.png', icon: 'pizza' },
  { meal: '午餐', food: '鸡胸肉', calories: 300, imageUrl: 'path/to/image.jpg', icon: 'egg' },
  { meal: '晚餐', food: '蔬菜沙拉', calories: 150, imageUrl: 'path/to/image.jpg', icon: 'fast-food' }
];

// 食谱推荐数据结构
recipeRecommendations = [
  { title: '鸡肉沙拉', description: '健康美味', calories: 350, imageUrl: 'path/to/image.jpg' },
  { title: '牛肉炖菜', description: '富含蛋白质', calories: 500, imageUrl: 'path/to/image.jpg' },
  { title: '水果拼盘', description: '清新爽口', calories: 200, imageUrl: 'path/to/image.jpg' }
];


  get progressText(): string {
    return `第 ${this.completedDays} / ${this.totalDays} 天`;  // 返回打卡进度文本
  }

  constructor() {}
}
