Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import { Injectable } from '@angular/core'; |
| 2 | import { Subject } from 'rxjs/Subject'; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 3 | import {MessageBoxData} from "./messageBox.data"; |
| 4 | import { SdcUiCommon} from "onap-ui-angular"; |
Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 5 | |
| 6 | @Injectable() |
| 7 | export class MessageBoxService { |
| 8 | static openModal: Subject<MessageBoxData> = new Subject<MessageBoxData>(); |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 9 | setConfig(messageBoxData: MessageBoxData) : SdcUiCommon.IModalConfig{ |
Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 10 | return { |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 11 | size : SdcUiCommon.ModalSize.medium, |
Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 12 | title : messageBoxData.title, |
| 13 | type : messageBoxData.type, |
| 14 | message : messageBoxData.message, |
| 15 | buttons: messageBoxData.buttons |
| 16 | }; |
| 17 | } |
Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 18 | } |