1 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
2 import { FormGroup } from '@angular/forms'
5 } from '@app/shared/form-validators/user-validators'
6 import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
9 selector: 'my-register-step-terms',
10 templateUrl: './register-step-terms.component.html',
11 styleUrls: [ './register.component.scss' ]
13 export class RegisterStepTermsComponent extends FormReactive implements OnInit {
14 @Input() hasCodeOfConduct = false
16 @Output() formBuilt = new EventEmitter<FormGroup>()
17 @Output() termsClick = new EventEmitter<void>()
18 @Output() codeOfConductClick = new EventEmitter<void>()
21 protected formValidatorService: FormValidatorService
27 return window.location.host
32 terms: USER_TERMS_VALIDATOR
35 setTimeout(() => this.formBuilt.emit(this.form))
38 onTermsClick (event: Event) {
39 event.preventDefault()
40 this.termsClick.emit()
43 onCodeOfConductClick (event: Event) {
44 event.preventDefault()
45 this.codeOfConductClick.emit()