Catalog alignment
[sdc.git] / catalog-ui / src / app / ng2 / components / modals / comment-modal / comment-modal.component.ts
1 /**
2  * Created by rc2122 on 5/31/2018.
3  */
4 import { Component, Input } from "@angular/core";
5 import { ValidationConfiguration } from "app/models";
6 import { Subject } from "rxjs/Subject";
7
8 @Component({
9     selector: 'comment-modal',
10     templateUrl: './comment-modal.component.html',
11     styleUrls: ['./comment-modal.less']
12 })
13
14 export class CommentModalComponent {
15
16     @Input() message:string;
17     onValidationChange: Subject<boolean> = new Subject();
18     //@Input() showComment:boolean;
19     private comment = {"text": ''};
20     private commentValidationPattern = ValidationConfiguration.validation.validationPatterns.comment;
21
22     private onValidityChange = (isValid: boolean):void => {
23         this.onValidationChange.next(isValid);
24     }
25 }