import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { NGXLogger } from 'ngx-logger';
import { FileEventJson } from '@ucap-webmessenger/protocol-event';

@Component({
  selector: 'ucap-chat-message-box-attach-file',
  templateUrl: './attach-file.component.html',
  styleUrls: ['./attach-file.component.scss']
})
export class AttachFileComponent implements OnInit {
  @Input()
  fileInfo: FileEventJson;
  @Input()
  expired = false;

  @Output()
  save = new EventEmitter<string>();

  constructor(private logger: NGXLogger) {}

  ngOnInit() {}

  onClickSave() {
    this.save.emit('save');
  }
  onClickSaveAs() {
    this.save.emit('saveAs');
  }
}
