aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/messageBox/messageBox.service.ts
blob: d73631a431d6913bf323b751be2bbbad9ec82d19 (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 {MessageBoxData} from "./messageBox.data";
import { SdcUiCommon} from "onap-ui-angular";

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