import { DominantSpeakersInfo } from '@azure/communication-calling' ; import { toFlatCommunicationIdentifier } from '@internal/acs-ui-common' ; import { CallClientState , DeviceManagerState , RemoteParticipantState , LocalVideoStreamState , CallErrors , DiagnosticsCallFeatureState } from '@internal/calling-stateful-client' ; public export type CallingBaseSelectorProps = { callId : string ; } ; private export const getDeviceManager = ( state ) : DeviceManagerState => state . deviceManager ; private export const getCallExists = ( state , props ) : boolean => ! ! state . calls [ props . callId ] ; private export const getDominantSpeakers = ( state , props ) : undefined | DominantSpeakersInfo => state . calls [ props . callId ] ?. dominantSpeakers ; private export const getRemoteParticipants = ( state , props ) : undefined | { [ keys ] : RemoteParticipantState ; } => state . calls [ props . callId ] ?. remoteParticipants ; private export const getIsScreenSharingOn = ( state , props ) : boolean | undefined => state . calls [ props . callId ] ?. isScreenSharingOn ; private export const getIsMuted = ( state , props ) : boolean | undefined => state . calls [ props . callId ] ?. isMuted ; private export const getLocalVideoStreams = ( state , props ) : LocalVideoStreamState [ ] | undefined => state . calls [ props . callId ] ?. localVideoStreams ; private export const getScreenShareRemoteParticipant = ( state , props ) : string | undefined => state . calls [ props . callId ] ?. screenShareRemoteParticipant ; private export const getDisplayName = ( state ) : string | undefined => state . callAgent ?. displayName ; private export const getIdentifier = ( state ) : string => toFlatCommunicationIdentifier ( state . userId ) ; private export const getLatestErrors = ( state ) : CallErrors => state . latestErrors ; private export const getDiagnostics = ( state , props ) : DiagnosticsCallFeatureState | undefined => state . calls [ props . callId ] ?. diagnostics ;