import { Component, Input } from "@angular/core";
import { MenuElement } from "src/app/model/view/menu-element";

@Component({
  selector: "app-side-menu",
  templateUrl: "./side-menu.component.html",
  styleUrl: "./side-menu.component.scss",
})
export class SideMenuComponent {
  @Input() elements: MenuElement[] = [];

  expand(element: MenuElement): void {
    element.expanded = true;
  }

  collapse(element: MenuElement): void {
    element.expanded = false;
  }
}
