import type { NowPlayingSession, UserDirectoryItem } from "./types";

export interface UserActivitySummary {
	sessions: NowPlayingSession[];
	active_count: number;
	idle_count: number;
	label: string;
	summary: string;
	primary_session: NowPlayingSession | null;
}

export interface UserStateItem extends UserDirectoryItem {
	activity: UserActivitySummary;
	activity_label: string;
	activity_summary: string;
	activity_count: number;
	activity_active_count: number;
	activity_idle_count: number;
}

export declare function mergeUsersWithActivity(
	users: UserDirectoryItem[],
	sessions: NowPlayingSession[],
): UserStateItem[];

export declare function resolveUserSelection(
	users: Array<UserDirectoryItem | UserStateItem>,
	identifier: string,
): UserStateItem | UserDirectoryItem | null;
