import {
  Component,
  Input,
  SimpleChanges,
  OnChanges
} from '@angular/core';

@Component({
  selector: 'sts-form-message-panel',
  templateUrl: './form-message-panel.component.html',
  styleUrls: ['./form-message-panel.component.scss']
})
export class FormMessagePanelComponent implements OnChanges {
  @Input() status : string;
  @Input() message : string;

  constructor(){
  }

  ngOnChanges(changes: SimpleChanges) {
    if (changes.status) {
      this.status = changes.status.currentValue;
    }
    if (changes.message) {
      this.message = changes.message.currentValue;
    }
  }
}
