import { Component, EventEmitter, Input, Output } from '@angular/core';
import { CommonNzModule } from '../../../../common.nz.module';
import { SettingService } from '../../../../services/setting.service';
import { NavigationComponent } from './navigation/navigation.component';

@Component({
  selector: 'manager-sidebar',
  standalone: true,
  imports: [CommonNzModule, NavigationComponent],
  templateUrl: './sidebar.component.html',
  styleUrl: './sidebar.component.less',
})
export class SidebarComponent {
  @Input() collapsed = false;
  @Output() collapseHandler = new EventEmitter<void>();

  constructor(readonly setting: SettingService) {}
  ngOnInit() {}
  onIconClick() {
    this.collapseHandler.emit();
  }

  get iconTypeString() {
    return `menu-${this.collapsed ? 'un' : ''}fold`;
  }
}
