import { EventBus } from '@ulangi/ulangi-event' ; import { ObservableVocabulary } from '@ulangi/ulangi-observable' ; import { boundClass } from 'autobind-decorator' ; import { EditVocabularyDelegate } from '../../delegates/vocabulary/EditVocabularyDelegate' ; import { DialogDelegate } from '../dialog/DialogDelegate' ; import { NavigatorDelegate } from '../navigator/NavigatorDelegate' ; import { AddEditVocabularyScreenDelegate } from './AddEditVocabularyScreenDelegate' ; import { VocabularyFormDelegate } from './VocabularyFormDelegate' ; @ boundClass export class EditVocabularyScreenDelegate extends AddEditVocabularyScreenDelegate { private editVocabularyDelegate : EditVocabularyDelegate ; public constructor ( eventBus , vocabularyFormDelegate , editVocabularyDelegate , dialogDelegate , navigatorDelegate ) { super ( eventBus , vocabularyFormDelegate , dialogDelegate , navigatorDelegate ) ; this . editVocabularyDelegate = editVocabularyDelegate ; } public saveEdit ( ) { this . editVocabularyDelegate . saveEdit ( { onSaving : this . showSavingDialog , onSaveSucceeded : this . showSaveSucceededDialog , onSaveFailed : this . showSaveFailedDialog , } ) ; } public createPreview ( ) { return this . editVocabularyDelegate . createPreview ( ) ; } }