import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { ActivatedRoute, RouterModule } from '@angular/router';

@Component({
  selector: 'app-nav-mobile-tabs',
  imports: [RouterModule,CommonModule],
  templateUrl: './nav-mobile-tabs.html',
  styleUrl: './nav-mobile-tabs.scss'
})
export class NavMobileTabs {
  // 底部导航
  navItems = [
    { path:"/menu/home",icon: 'fas fa-home', text: '首页' },
    { path:"/menu/story",icon: 'fas fa-book-open', text: '故事' },
    { path:"/menu/order",icon: 'fas fa-shopping-cart', text: '购物车' },
    { path:"/menu/reserve",icon: 'fas fa-search', text: '发现' },
    { path:"/menu/mine",icon: 'fas fa-user', text: '我的', active: true }
  ];
  currentPath:string = ""
  goPath(nav:any){
    this.currentPath = nav.path
  }
  constructor(
    private route:ActivatedRoute
  ){
    this.route.params.subscribe(data=>{
      // console.log(this.currentPath,location.pathname)
      // this.currentPath = location.pathname
    })
  }
}
