40 lines
992 B
TypeScript
40 lines
992 B
TypeScript
// Metro module 12816 (f12817).
|
|
import { HavenSoundKeys } from "./constants";
|
|
import { intl } from "../../intl/index.native";
|
|
import Haven_messages from "./Haven.messages";
|
|
let parseSeat;
|
|
const parseParticipant = function parseParticipant(a0) {
|
|
return {
|
|
userId: a0.user_id,
|
|
position: a0.position,
|
|
avatar: a0.avatar
|
|
};
|
|
};
|
|
parseSeat = function parseSeat(a0) {
|
|
return {
|
|
id: a0.id,
|
|
claimedBy: a0.claimed_by
|
|
};
|
|
};
|
|
export { parseParticipant };
|
|
export { parseSeat };
|
|
export function parseRoom(a0) {
|
|
return {
|
|
roomId: a0.room_id,
|
|
participants: a0.participants.map(parseParticipant),
|
|
seats: a0.seats.map(parseSeat)
|
|
};
|
|
}
|
|
export function getHavenSoundControlName(a0) {
|
|
if (HavenSoundKeys.RADIO === a0) {
|
|
return intl.string(Haven_messages.AjiGKB);
|
|
}
|
|
if (HavenSoundKeys.ENVIRONMENT === a0) {
|
|
return intl.string(Haven_messages.YEYIbI);
|
|
}
|
|
if (HavenSoundKeys.CAMPFIRE === a0) {
|
|
return intl.string(Haven_messages["Vk9+Ez"]);
|
|
}
|
|
return "";
|
|
}
|