import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';  // 导入 FormsModule
import { IonicModule } from '@ionic/angular';  // 导入 IonicModule

@Component({
  selector: 'app-tab1',
  standalone: true,  // 设置为独立组件
  imports: [IonicModule, FormsModule],  // 导入所需的模块
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss'],
})
export class Tab1Page {

  // 声明 user 对象
  user = {
    name: '',
    age: null,
    height: null,
    weight: null,
    goal: ''
  };

  constructor() {}

  // 提交表单
  submitForm() {
    console.log('User info:', this.user);
  }

  // 示例的页面跳转方法
  goToHome() {
    console.log('Navigating to Home');
  }

  goToRecommend() {
    console.log('Navigating to Recommend');
  }

  goToStats() {
    console.log('Navigating to Stats');
  }

  goToProfile() {
    console.log('Navigating to Profile');
  }

  goToSettings() {
    console.log('Navigating to Settings');
  }

  goToLogin() {
    console.log('Navigating to Login');
  }

  goToRegister() {
    console.log('Navigating to Register');
  }
}
