import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ActionsLayout } from '@progress/kendo-angular-dialog';

@Component({
  selector: 'app-message-information',
  templateUrl: './message-information.component.html',
  styleUrls: ['./message-information.component.scss']
})
export class MessageInformationComponent implements OnInit {

  @Input() opened = false;
  @Input() title: string;
  @Input() message: string;
  @Input() information: string;

  @Output() resultEvent = new EventEmitter<boolean>();
  openedDialog = false;
  public loadingIcon = '';

  public actionsLayout: ActionsLayout = 'normal';

  public onDialogClose(): void {
    this.resultEvent.emit(false);
    this.openedDialog = false;
  }

  public open(): void {
    this.opened = true;
  }

  public closeDialog() {
    this.openedDialog = false;
    this.resultEvent.emit(false);
  }

  constructor() { }

  ngOnInit() {
  }

}
