import { Component , OnInit } from '@angular/core' ; import { MindsUser } from '../../../interfaces/entities' ; import { SiteService } from '../../../common/services/site.service' ; @ Component ( { selector : 'm-auth__modal' , templateUrl : './auth-modal.component.html' , styleUrls : [ './auth-modal.component.ng.scss' ] , } ) export class AuthModalComponent implements OnInit { formDisplay : 'register' | 'login' = 'register' ; /**
     * Completion intent
     */ onComplete : ( any ) => any = ( ) => { } ; /**
     * Dismiss intent
     */ onDismissIntent : ( ) => void = ( ) => { } ; param onComplete param onDismissIntent param defaults set opts ( { formDisplay , onComplete , onDismissIntent } ) { this . formDisplay = formDisplay ; this . onComplete = onComplete || ( ( ) => { } ) ; this . onDismissIntent = onDismissIntent || ( ( ) => { } ) ; } constructor ( public siteService ) { } ngOnInit ( ) { } param user onRegisterDone ( user ) { this . onComplete ( user ) ; } param user onLoginDone ( user ) { this . onComplete ( user ) ; } param e showLoginForm ( e ) { this . formDisplay = 'login' ; } param e showRegisterForm ( e ) { this . formDisplay = 'register' ; } }