import { Subject } from 'rxjs';
import { Injectable } from '@angular/core';

import { MenuItemComponent } from './components/menu/menuitem.component';

@Injectable()
export class BreadcrumbService
{
  private readonly itemsSource = new Subject<MenuItemComponent[]>();

  itemsHandler = this.itemsSource.asObservable();

  setItems(items: MenuItemComponent[])
  {
    this.itemsSource.next(items);
  }
}
