import { useRoomCallMembersFromRegistry } from '../../state/activeCallRoomsRegistry';

export type { CallMember } from './callMemberUtils';
export { getActiveCallMembers, CALL_MEMBER_EVENT_TYPE } from './callMemberUtils';

/**
 * Hook to get the list of users currently in a call in a room.
 * Backed by a shared registry — one state listener for all rooms.
 */
export function useRoomCallMembers(roomId: string, enabled = true) {
  return useRoomCallMembersFromRegistry(roomId, enabled);
}
