import { Component } from '@angular/core';
import { CommonNzModule } from '../../../common.nz.module';
import { HeaderComponent } from './header/header.component';
import { ManagerLayoutService } from './layout.service';
import { SidebarComponent } from './sidebar/sidebar.component';

@Component({
  selector: 'manager-layout',
  standalone: true,
  imports: [CommonNzModule, HeaderComponent, SidebarComponent],
  templateUrl: './layout.component.html',
  styleUrl: './layout.component.less',
  host: {
    class: 'custom-scroll-bar',
  },
})
export class LayoutComponent {
  constructor(private service: ManagerLayoutService) {}
  get sideCollapsed() {
    return this.service.sideCollapsed();
  }
  get sideWidth() {
    return this.service.sideWidth;
  }
  get sideWidthPixel() {
    return this.service.sideWidthPixel;
  }
  toggleSidebar() {
    this.service.toggleSidebar();
  }
}
