import { Component } from '@angular/core';
// import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
import { IonicModule } from '@ionic/angular';
import { CommonModule } from '@angular/common';
import { addIcons } from 'ionicons';
import { bookmarkOutline, cartOutline, documentTextOutline, downloadOutline, ellipsisHorizontal, heartOutline, imageOutline, imagesOutline, search, timeOutline, walletOutline } from 'ionicons/icons';


@Component({
  selector: 'app-tab3',
  templateUrl: 'tab3.page.html',
  styleUrls: ['tab3.page.scss'],
  standalone: true,
  imports: [ExploreContainerComponent,
    IonicModule,
    CommonModule
  ],
})
export class Tab3Page {
  profile = {
    name: 'X',
    level: 'X',
    vipStatus: true,
    buttons: [
        { icon: 'time-outline', text: '浏览记录' },
        { icon: 'download-outline', text: '我的下载' },
        { icon: 'cart-outline', text: '我的购买' },
        { icon: 'wallet-outline', text: '我的钱包' }
    ],
    tabs: [
        { icon: 'images-outline', text: '全部' },
        { icon: 'image-outline', text: '图文' },
        { icon: 'document-text-outline', text: '文章' }
    ]
  };

  showTabs = false;;
  activeTab : string = 'all';
  constructor() {
    addIcons({search, ellipsisHorizontal, timeOutline, downloadOutline, cartOutline, walletOutline, heartOutline, bookmarkOutline, imageOutline, imagesOutline, documentTextOutline});
  }

  toggleTabs(action: string) {
    this.showTabs =true;
    this.activeTab = action === 'like' ? 'all' :'collect';
  }
  setActiveTab(tab:string) {
   this.activeTab = tab;
  }
}
