import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { CommonService } from '../../services/common/common.service';
import { EmailInput } from './models/email-input';

@Component({
    selector: 'app-email',
    templateUrl: './email.component.html',
    styleUrls: ['./email.component.scss']
})
export class EmailComponent implements OnInit {

    @Input() value: EmailInput;
    @Output() emailEntered = new EventEmitter();
    constructor(
        public cs: CommonService
    ) { }

    ngOnInit() {
    }

    public triggerValue() {
        this.emailEntered.emit(this.value);
    }

}
