import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { CommonService } from '../../services/common/common.service';
import { TranslatorService } from '../../services/translator/translator.service';

@Component({
  selector: 'detail-button',
  templateUrl: './detail-button.component.html',
  styleUrls: ['./detail-button.component.scss'],
})
export class DetailButtonComponent implements OnInit {

  @Input() src: string;
  @Input() title: string;
  @Output() click = new EventEmitter();
  public direction;

  constructor(
    public cs: CommonService,
    public ts: TranslatorService
  ) { }

  ngOnInit() {
    this.direction = TranslatorService.getCurrentDirection();
  }

  public onClick(event: any) {
    this.click.emit(event);
  }

}
