import {Component, OnInit} from '@angular/core';
import {CHILDMENUNAME, MENUNAME} from "../../../services/local-storage.namespace";
import {NzBreadCrumbComponent, NzBreadCrumbItemComponent} from "ng-zorro-antd/breadcrumb";
import {BrowserStorageService} from "../../../utils/localStorage.service";

@Component({
  selector: 'app-breadcrumb',
  standalone: true,
  imports: [
    NzBreadCrumbComponent,
    NzBreadCrumbItemComponent
  ],
  templateUrl: './breadcrumb.component.html',
  styleUrl: './breadcrumb.component.less'
})
export class BreadcrumbComponent implements OnInit {

  childMenuName; // 子路由名称
  menuName; // 父路由名称
  constructor(
    private storage: BrowserStorageService,
  ) { }

  ngOnInit() {
    this.childMenuName = this.storage.get(CHILDMENUNAME);
    this.menuName = this.storage.get(MENUNAME);
  }

}
