import {Component, HostListener} from '@angular/core';
import {Location} from "@angular/common";
import { DeviceService} from '../../services/device.service';

@Component({
  selector: 'fm-back-button',
  templateUrl: './back-button.component.html',
  styleUrls: ['./back-button.component.scss']
})
export class BackButtonComponent {

  @HostListener('click')
  onBackClicked() {
    this.location.back();
  }

  constructor(private location: Location,private deviceService:DeviceService) { }

  public show() {
    return !this.deviceService.IsMobile();
  }

}
