Total Complexity | 1 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import {ILanguageSetup} from '../../../Language/ChangeLanguageSetup'; |
||
6 | |||
7 | export default class Presenter { |
||
8 | languageSetupObserver: IObserver<ILanguageSetup>; |
||
9 | topAppBarPresenter: TopBarPresenter; |
||
10 | |||
11 | constructor(languageSetupObserver: IObserver<ILanguageSetup>, topAppBarPresenter: TopBarPresenter) { |
||
12 | 2 | this.languageSetupObserver = languageSetupObserver; |
|
13 | 2 | this.topAppBarPresenter = topAppBarPresenter; |
|
14 | } |
||
15 | |||
16 | present(data: string) { |
||
17 | 1 | const viewModel: Model = new Model(); |
|
18 | 1 | const translator: Translator = this.languageSetupObserver.value.translator; |
|
19 | 1 | viewModel.text = data + translator.translate('Application.Test'); |
|
20 | 1 | viewModel.topAppBar = this.topAppBarPresenter.present(); |
|
21 | |||
22 | 1 | return viewModel; |
|
23 | } |
||
24 | } |