import { Module } from '@ringcentral-integration/commons/lib/di' ; import { RcUIModuleV2 , UIFunctions , UIProps , } from '@ringcentral-integration/core' ; import { CallBadgeContainerProps , CallBadgePanelProps , Deps , } from './CallBadgeUI.interface' ; @ Module ( { name : 'CallBadgeUI' , deps : [ 'Locale' , 'Webphone' , { dep : 'CallBadgeUIOptions' , optional : true } ] , } ) class CallBadgeUI extends RcUIModuleV2 < Deps > { constructor ( deps ) { super ( { deps } ) ; } getUIProps ( { hidden , defaultOffsetX = 0 , defaultOffsetY = 0 , } ) { const currentSession = this . _deps . webphone . activeSession || this . _deps . webphone . ringSession || { } ; return { hidden , defaultOffsetX , defaultOffsetY , session : currentSession , currentLocale : this . _deps . locale . currentLocale , } ; } getUIFunctions ( { goToCallCtrl , } ) { return { goToCallCtrl , toggleMinimized : ( id ) => this . _deps . webphone . toggleMinimized ( id ) , } ; } } export { CallBadgeUI } ;