import { Component } from '@angular/core';
import {NzTreeComponent} from "ng-zorro-antd/tree";
import {NgIf} from "@angular/common";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzDropdownMenuComponent} from "ng-zorro-antd/dropdown";
import {MenuService} from "../../../servies/menu/menu.service";
import {menuData} from "../../../data/menu/menu.namespace";

@Component({
  selector: 'app-menu',
  standalone: true,
  imports: [
    NzTreeComponent,
    NgIf,
    NzIconDirective,
    NzDropdownMenuComponent
  ],
  templateUrl: './menu.component.html',
  styleUrl: './menu.component.less'
})
export class MenuComponent {

  menuData = [];

  constructor(private menuService: MenuService) {

  }

  queryMenu() {
    this.menuService.queryRoleMenuTree('', (data: any) => {
      this.menuData = data['return_data'];
      console.log(data)
    });
  }


}
