import type { Room } from '../../../../shared-kernel';
import type { VoiceSessionInfo } from '../models/voice-session.model';

export function isViewingVoiceSessionServer(
  session: VoiceSessionInfo | null,
  currentServerId: string | null
): boolean {
  return !session || currentServerId === session.serverId;
}

export function buildVoiceSessionRoom(session: VoiceSessionInfo): Room {
  return {
    id: session.serverId,
    name: session.serverName,
    description: session.serverDescription,
    hostId: '',
    isPrivate: false,
    createdAt: 0,
    userCount: 0,
    maxUsers: 50,
    icon: session.serverIcon
  };
}
