blob: d73631a431d6913bf323b751be2bbbad9ec82d19 [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001import { Injectable } from '@angular/core';
2import { Subject } from 'rxjs/Subject';
Ittay Stern6f900cc2018-08-29 17:01:32 +03003import {MessageBoxData} from "./messageBox.data";
4import { SdcUiCommon} from "onap-ui-angular";
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03005
6@Injectable()
7export class MessageBoxService {
8 static openModal: Subject<MessageBoxData> = new Subject<MessageBoxData>();
Ittay Stern6f900cc2018-08-29 17:01:32 +03009 setConfig(messageBoxData: MessageBoxData) : SdcUiCommon.IModalConfig{
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030010 return {
Ittay Stern6f900cc2018-08-29 17:01:32 +030011 size : SdcUiCommon.ModalSize.medium,
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030012 title : messageBoxData.title,
13 type : messageBoxData.type,
14 message : messageBoxData.message,
15 buttons: messageBoxData.buttons
16 };
17 }
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030018}