import { Component, OnInit } from "@angular/core";
import {
  FileManagerType,
  DownloadManagerService,
} from "src/app/shared/services/download-manager-service";
import { sideMenuActiveObserver } from "../header/header.component";
import {Location} from '@angular/common';

@Component({
  selector: "app-download-manager",
  templateUrl: "./download-manager.component.html",
  styleUrls: ["./download-manager.component.scss"],
})
export class DownloadManagerComponent implements OnInit {
  fileList: FileManagerType[] = [];

  constructor(
    private downloadManagerService: DownloadManagerService,
    private location: Location
  ) {
    this.fileList = this.downloadManagerService.getFileList();
  }

  public navigateBack(){
    this.location.back();
  }

  ngOnInit(): void {
    sideMenuActiveObserver.next(false);
  }
}
