import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { MenuService } from 'src/app/_providers/_services/menu.service';
import { UiService } from 'src/app/_providers/_services/ui.service';

@Component({
  selector: 'app-favourites',
  templateUrl: './favourites.component.html',
  styleUrls: ['./favourites.component.scss']
})
export class FavouritesComponent implements OnInit {
  favouriteMenuData: any;

  constructor(
    public _menuService: MenuService,
    private _router: Router,
    private _uiService: UiService,
    private _errorTranslateService: ErrorTranslateService
  ) {
    this.getMenuData();
  }

  ngOnInit(): void {

  }

  async getMenuData() {
    // let filter="?where[favourite]=Y"
    // await this._menuService.getMenuData(apiUrl.sisUsermenu,filter).then((res) => {
    //   // this.favouriteMenuData = res;
    //   this._menuService.favouriteMenuData=res
    // },
    //   (err) => {
    //     console.log("===err====", err);
    //     this._uiService.toastMessage(err.error.message ? err.error.message : this._errorTranslateService.translate('errorInApi'));
    //   });
  }


  navigateTo(destination) {
    this._router.navigate([destination]);
  }

}
