summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/messageBox/messageBox.service.ts
blob: eaa012d3bec638f7e646dbf3b30ff72a4ac5fbce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { IModalConfig, MessageBoxData, ModalSize, ModalType } from './messageBox.data';

@Injectable()
export class MessageBoxService {
  static openModal: Subject<MessageBoxData> = new Subject<MessageBoxData>();
  setConfig(messageBoxData: MessageBoxData) : IModalConfig{
    return {
      size : ModalSize.medium,
      title : messageBoxData.title,
      type : messageBoxData.type,
      message : messageBoxData.message,
      buttons: messageBoxData.buttons
    };
  }

}