/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component, OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { ModalWindowService } from '../modal-window/modal-window.service';
import { BciImprintDetailsService } from './bci-imprint-details.service';
import { BciImprintIntl } from './imprint-intl';
import { ImprintModel } from './imprint.model';

@Component({
  selector: 'bci-imprint',
  templateUrl: './bci-imprint.component.html',
  styleUrls: ['./bci-imprint.component.scss'],
})
export class BciImprintComponent implements OnInit {
  data: ImprintModel;

  constructor(
    public imprintIntl: BciImprintIntl,
    private modalWindowService: ModalWindowService,
    private imprintDetailsService: BciImprintDetailsService,
    private dialogRef: MatDialogRef<BciImprintComponent>
  ) {}

  ngOnInit() {
    this.imprintDetailsService.getImprintDetails().subscribe((imprintModel) => {
      this.data = imprintModel;
    });
  }

  public clickCancel(): void {
    this.dialogRef.close();
  }
}
