import { CommonModule } from '@angular/common';
import { Component, Output, EventEmitter } from '@angular/core'; // 添加缺失的导入
import { MatIconModule } from '@angular/material/icon';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';


@Component({
  selector: 'app-nav-mobile-tabs',
  standalone:true,
  imports: [
    CommonModule,
    MatToolbarModule,
    MatTabsModule,
    MatIconModule
  ],
  templateUrl: './nav-mobile-tabs.component.html',
  styleUrls: ['./nav-mobile-tabs.component.scss']
})
export class NavMobileTabsComponent {
  activeTab: string = 'design';

  // 添加缺失的装饰器导入后，这些就不会报错了
  @Output() tabChanged = new EventEmitter<string>(); // 事件发射器

  changeTab(tabName: string): void {
    this.activeTab = tabName;
    this.tabChanged.emit(tabName); // 发出事件
  }
}
