import { ScreenName } from '@ulangi/ulangi-common/enums' ; import { boundClass } from 'autobind-decorator' ; import { NavigatorDelegate } from '../navigator/NavigatorDelegate' ; import { SuggestionListDelegate } from '../vocabulary/SuggestionListDelegate' ; @ boundClass export class SuggestionsPickerScreenDelegate { private suggestionListDelegate : SuggestionListDelegate ; private navigatorDelegate : NavigatorDelegate ; public constructor ( suggestionListDelegate , navigatorDelegate ) { this . suggestionListDelegate = suggestionListDelegate ; this . navigatorDelegate = navigatorDelegate ; } public getSuggestions ( ) { this . suggestionListDelegate . getSuggestions ( ) ; } public clearSuggestions ( ) { this . suggestionListDelegate . clearSuggestions ( ) ; } public onSelectSuggestion ( fieldName , value ) { this . suggestionListDelegate . onSelectSuggestion ( fieldName , value ) ; } public showLink ( link , screenTitle ) { this . navigatorDelegate . showModal ( ScreenName . BROWSER_SCREEN , { link , screenTitle , } ) ; } public close ( ) { this . navigatorDelegate . dismissLightBox ( ) ; } }