import { Component } from '@angular/core' ; import { CreateService } from '../../create.service' ; import { NotifierService } from 'angular-notifier' ; import { I18nService } from '../../../../layout/components/i18n/i18n.service' ; import { ExceptionHandlerService } from '../../../../shared/services/exceptionhandler.service' ; @ Component ( { selector : 'app-account-create-record' , styleUrls : [ './record.component.scss' ] , templateUrl : './record.component.html' } ) export class AccountCreateRecordComponent { constructor ( public createService , private notifierService , private i18nService , private exceptionHandlerService ) { } public back ( ) { this . createService . previousStep ( ) ; } public next ( ) { this . createService . nextStep ( ) ; } public async copy ( ) { try { await navigator . clipboard . writeText ( this . createService . getPhrase ( ) ) ; const msg = this . i18nService . getTranslation ( 'success_clipboard_copy' ) ; this . notifierService . notify ( 'success' , msg ) ; } catch ( e ) { this . exceptionHandlerService . handle ( e ) ; } } print ( ) { window . print ( ) ; } }