import type {
  CameraState,
  VoiceState,
  ScreenShareState
} from './voice-state.models';
import type { GameActivity } from './game-activity.models';

export type UserStatus = 'online' | 'away' | 'busy' | 'offline' | 'disconnected';

export type UserRole = 'host' | 'admin' | 'moderator' | 'member';

export interface User {
  id: string;
  oderId: string;
  username: string;
  displayName: string;
  description?: string;
  profileUpdatedAt?: number;
  avatarUrl?: string;
  avatarHash?: string;
  avatarMime?: string;
  avatarUpdatedAt?: number;
  status: UserStatus;
  role: UserRole;
  joinedAt: number;
  peerId?: string;
  isOnline?: boolean;
  isAdmin?: boolean;
  isRoomOwner?: boolean;
  presenceServerIds?: string[];
  voiceState?: VoiceState;
  screenShareState?: ScreenShareState;
  cameraState?: CameraState;
  gameActivity?: GameActivity;
}

export interface RoomMember {
  id: string;
  oderId?: string;
  username: string;
  displayName: string;
  description?: string;
  profileUpdatedAt?: number;
  avatarUrl?: string;
  avatarHash?: string;
  avatarMime?: string;
  avatarUpdatedAt?: number;
  role: UserRole;
  roleIds?: string[];
  joinedAt: number;
  lastSeenAt: number;
}
