import { Component, ElementRef, ViewChild } from '@angular/core';
import { MdDialogRef } from '@angular/material';

@Component({
    selector: 'knk-preview-image-dialog',
    template: `
  <h1 md-dialog-title>Preview document</h1>
  <md-dialog-content class="centered">
  Hi, I'm lazy!
  </md-dialog-content>
  `,
    styles: ['.centered{ display: flex; justify-content:center;}']
})
export class LazyDialogComponent {
    file: string;
    @ViewChild('img') image: ElementRef;
    constructor(public dialogRef: MdDialogRef<LazyDialogComponent>) {
        setTimeout(() => {
            this.dialogRef.close();
        }, 5000);
    }
}
