import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-tab5',
  standalone: true,
  imports: [IonicModule, CommonModule],
  templateUrl: './tab5.page.html',
  styleUrls: ['./tab5.page.scss']
})
export class Tab5Page {
  constructor(private router: Router) {}

  openAIChat() {
    this.router.navigate(['/ai-chat']);
  }

  logout() {
    // 这里做清理登录状态的操作
    localStorage.removeItem('token'); // 示例清除token
    // 跳转到登录注册页面，确保路由路径正确
    this.router.navigate(['/auth']);
  }
}
