import { Component } from '@angular/core';
import { IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList } from '@ionic/angular/standalone';
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
import { IonButton } from '@ionic/angular/standalone';
import { IonIcon } from '@ionic/angular/standalone';
import { Router } from '@angular/router';
import { CommonModule } from '@angular/common';


@Component({
  selector: 'app-tab1',
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss'],
  standalone: true,
  imports: [
    IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
    IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule
  ],
})
export class Tab1Page {



  constructor(private router: Router) {}

  /**
   * Go to the ai page
   */
  goToPage1(){
    this.router.navigate(['/tabs/inquiry'])
  }

  /**
   * Go to the human page
   */
  goToPage2(){
    this.router.navigate(['/tabs/page-test'])
  }

  goToPicture(){
    this.router.navigate(['/tabs/picture'])
  }
  searchContent:string = ''; //搜索内容

  handleInput(ev:any) {
    console.log("ev.detail.value: ",ev.detail.value)
    this.searchContent = ev.detail.value;
  }

  search(){
    if (this.searchContent == ''){
      console.log("请输入搜索内容")
    }
    else {
      console.log("搜索内容: ",this.searchContent)
      this.searchContent = '';
    }
  }


  ngOnInit() {}
}
