import { Injectable } from '@angular/core';
import { AlgorithmCategory } from '../models/algorithm-category';
import { Observable, of } from 'rxjs';
import {RouterConstants} from '../../../constants/RouterConstants';

@Injectable({
  providedIn: 'root'
})
export class AlgorithmsService {

  private readonly categories: AlgorithmCategory[] = [
    {
      id: 'pathfinding',
      title: 'ALGORITHM.PATHFINDING.TITLE',
      description: 'ALGORITHM.PATHFINDING.DESCRIPTION',
      routerLink: RouterConstants.PATHFINDING.LINK
    },
    {
      id: 'sorting',
      title: 'ALGORITHM.SORTING.TITLE',
      description: 'ALGORITHM.SORTING.DESCRIPTION',
      routerLink: RouterConstants.SORTING.LINK
    },
    {
      id: 'gameOfLife',
      title: 'ALGORITHM.GOL.TITLE',
      description: 'ALGORITHM.GOL.DESCRIPTION',
      routerLink: RouterConstants.GOL.LINK
    },
    {
      id: 'labyrinth',
      title: 'ALGORITHM.LABYRINTH.TITLE',
      description: 'ALGORITHM.LABYRINTH.DESCRIPTION',
      routerLink: RouterConstants.LABYRINTH.LINK
    },
    {
      id: 'fractal',
      title: 'ALGORITHM.FRACTAL.TITLE',
      description: 'ALGORITHM.FRACTAL.DESCRIPTION',
      routerLink: RouterConstants.FRACTAL.LINK
    },
    {
      id: 'fractal3d',
      title: 'ALGORITHM.FRACTAL3D.TITLE',
      description: 'ALGORITHM.FRACTAL3D.DESCRIPTION',
      routerLink: RouterConstants.FRACTAL3d.LINK
    },
    {
      id: 'pathTracing',
      title: 'ALGORITHM.PATH_TRACING.TITLE',
      description: 'ALGORITHM.PATH_TRACING.DESCRIPTION',
      routerLink: RouterConstants.PATH_TRACING.LINK
    }
  ];

  getCategories(): Observable<AlgorithmCategory[]> {
    return of(this.categories);
  }
}
