aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/messageBox/messageBox.data.ts
blob: 165140ba7836485d9345a69d1fd2e3d7d7b1b086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { Subject } from 'rxjs/Subject';

export class  MessageBoxData {
  title?: string;
  message?: string;
  size : ModalSize;
  type: ModalType;
  buttons: Array<IModalButtonComponent>;

  constructor(title: string, message: string, type: ModalType, size : ModalSize, buttons: Array<IModalButtonComponent>) {
    this.title = title;
    this.message = message;
    this.size = size;
    this.type = type;
    this.buttons = buttons;
  }
}

export interface IModalConfig {
  size?: string;
  title?: string;
  message?: string;
  buttons?: Array<IModalButtonComponent>;
  type?: string;
}
export interface IButtonComponent {
  text: string;
  disabled?: boolean;
  type?: string;
  size?: string;
}
export interface IModalButtonComponent extends IButtonComponent {
  callback?: Function;
  closeModal?: boolean;
}
export  enum ModalType {
  alert = "alert",
  error = "error",
  standard = "info",
  custom = "custom",
}
export enum ModalSize {
  xlarge = "xl",
  large = "l",
  medium = "md",
  small = "sm",
  xsmall = "xsm",
}