256 lines
9.1 KiB
TypeScript
256 lines
9.1 KiB
TypeScript
// Module ID: 11939
|
|
// Function ID: 92362
|
|
// Name: getActivityHeader
|
|
// Dependencies: [653, 11940, 11941, 1212, 11943, 11944, 9012, 2]
|
|
// Exports: default
|
|
|
|
// Module 11939 (getActivityHeader)
|
|
import ME from "ME";
|
|
|
|
let closure_3;
|
|
let closure_4;
|
|
({ ActivityTypes: closure_3, PlatformTypes: closure_4 } = ME);
|
|
const result = require("PlatformTypes").fileFinishedImporting("modules/user_profile/utils/getActivityHeader.tsx");
|
|
|
|
export default function getActivityHeader(session_id) {
|
|
const tmp = importDefault(11940)(session_id.session_id);
|
|
const tmp2 = importDefault(11941)(session_id);
|
|
if (null != tmp2) {
|
|
const icon = tmp2.icon;
|
|
}
|
|
let name;
|
|
if (null != tmp2) {
|
|
name = tmp2.name;
|
|
}
|
|
let str = "";
|
|
if (null != name) {
|
|
str = name;
|
|
}
|
|
if (session_id.type === constants.PLAYING) {
|
|
let type;
|
|
if (null != tmp2) {
|
|
type = tmp2.type;
|
|
}
|
|
if (type === constants2.XBOX) {
|
|
let obj = {};
|
|
const intl21 = require(1212) /* getSystemLocale */.intl;
|
|
obj = {};
|
|
const intl22 = require(1212) /* getSystemLocale */.intl;
|
|
obj.platform = intl22.string(require(1212) /* getSystemLocale */.t.Nfvo72);
|
|
obj.text = intl21.formatToPlainString(require(1212) /* getSystemLocale */.t.A17aM8, obj);
|
|
obj.platformIcon = icon;
|
|
obj.platformLabel = str;
|
|
return obj;
|
|
}
|
|
}
|
|
if (session_id.type === constants.PLAYING) {
|
|
let type1;
|
|
if (null != tmp2) {
|
|
type1 = tmp2.type;
|
|
}
|
|
if (type1 === constants2.PLAYSTATION) {
|
|
const obj1 = {};
|
|
const intl19 = require(1212) /* getSystemLocale */.intl;
|
|
const obj2 = {};
|
|
const intl20 = require(1212) /* getSystemLocale */.intl;
|
|
obj2.platform = intl20.string(require(1212) /* getSystemLocale */.t.fFl4jo);
|
|
obj1.text = intl19.formatToPlainString(require(1212) /* getSystemLocale */.t.A17aM8, obj2);
|
|
obj1.platformIcon = icon;
|
|
obj1.platformLabel = str;
|
|
return obj1;
|
|
}
|
|
}
|
|
if (session_id.type === constants.PLAYING) {
|
|
let type2;
|
|
if (null != tmp2) {
|
|
type2 = tmp2.type;
|
|
}
|
|
if (type2 === constants2.META_QUEST_OR_HORIZON) {
|
|
const obj3 = {};
|
|
const intl17 = require(1212) /* getSystemLocale */.intl;
|
|
const obj4 = {};
|
|
const intl18 = require(1212) /* getSystemLocale */.intl;
|
|
const string2 = intl18.string;
|
|
const t2 = require(1212) /* getSystemLocale */.t;
|
|
if (tmp64) {
|
|
let string2Result = string2(t2.BrHQaq);
|
|
} else {
|
|
string2Result = string2(t2.p6vL0e);
|
|
}
|
|
obj4.platform = string2Result;
|
|
obj3.text = intl17.formatToPlainString(require(1212) /* getSystemLocale */.t.A17aM8, obj4);
|
|
obj3.platformIcon = icon;
|
|
obj3.platformLabel = str;
|
|
return obj3;
|
|
}
|
|
}
|
|
if (session_id.type === constants.WATCHING) {
|
|
let type3;
|
|
if (null != tmp2) {
|
|
type3 = tmp2.type;
|
|
}
|
|
if (type3 === constants2.META_QUEST_OR_HORIZON) {
|
|
const obj5 = {};
|
|
const intl15 = require(1212) /* getSystemLocale */.intl;
|
|
const obj6 = {};
|
|
const intl16 = require(1212) /* getSystemLocale */.intl;
|
|
const string = intl16.string;
|
|
const t = require(1212) /* getSystemLocale */.t;
|
|
if (tmp57) {
|
|
let stringResult = string(t.BrHQaq);
|
|
} else {
|
|
stringResult = string(t.p6vL0e);
|
|
}
|
|
obj6.platform = stringResult;
|
|
obj5.text = intl15.formatToPlainString(require(1212) /* getSystemLocale */.t.ENbTKQ, obj6);
|
|
obj5.platformIcon = icon;
|
|
obj5.platformLabel = str;
|
|
return obj5;
|
|
}
|
|
}
|
|
if (session_id.type === constants.STREAMING) {
|
|
let type4;
|
|
if (null != tmp2) {
|
|
type4 = tmp2.type;
|
|
}
|
|
if (type4 === constants2.TWITCH) {
|
|
const obj7 = {};
|
|
const intl13 = require(1212) /* getSystemLocale */.intl;
|
|
const obj8 = {};
|
|
const intl14 = require(1212) /* getSystemLocale */.intl;
|
|
obj8.name = intl14.string(require(1212) /* getSystemLocale */.t.q4pBG3);
|
|
obj7.text = intl13.formatToPlainString(require(1212) /* getSystemLocale */.t["4CQq9Q"], obj8);
|
|
obj7.platformIcon = icon;
|
|
obj7.platformLabel = str;
|
|
return obj7;
|
|
}
|
|
}
|
|
if (session_id.type === constants.STREAMING) {
|
|
let type5;
|
|
if (null != tmp2) {
|
|
type5 = tmp2.type;
|
|
}
|
|
if (type5 === constants2.YOUTUBE) {
|
|
const obj9 = {};
|
|
const intl11 = require(1212) /* getSystemLocale */.intl;
|
|
const obj10 = {};
|
|
const intl12 = require(1212) /* getSystemLocale */.intl;
|
|
obj10.name = intl12.string(require(1212) /* getSystemLocale */.t.aS6cK4);
|
|
obj9.text = intl11.formatToPlainString(require(1212) /* getSystemLocale */.t["4CQq9Q"], obj10);
|
|
obj9.platformIcon = icon;
|
|
obj9.platformLabel = str;
|
|
return obj9;
|
|
}
|
|
}
|
|
if (null != tmp) {
|
|
type = session_id.type;
|
|
if (constants.PLAYING === type) {
|
|
let Dzgz4u = require(1212) /* getSystemLocale */.t.A17aM8;
|
|
} else if (constants.WATCHING === type) {
|
|
Dzgz4u = require(1212) /* getSystemLocale */.t.ENbTKQ;
|
|
} else if (constants.LISTENING === type) {
|
|
Dzgz4u = require(1212) /* getSystemLocale */.t.EcHzWI;
|
|
} else if (constants.COMPETING === type) {
|
|
Dzgz4u = require(1212) /* getSystemLocale */.t.ikpHeS;
|
|
} else if (constants.STREAMING === type) {
|
|
Dzgz4u = require(1212) /* getSystemLocale */.t.Dzgz4u;
|
|
}
|
|
if (undefined !== Dzgz4u) {
|
|
const obj11 = {};
|
|
const intl10 = require(1212) /* getSystemLocale */.intl;
|
|
const obj12 = { platform: tmp74 };
|
|
obj11.text = intl10.formatToPlainString(Dzgz4u, obj12);
|
|
obj11.platformIcon = icon;
|
|
obj11.platformLabel = str;
|
|
return obj11;
|
|
}
|
|
tmp74 = importDefault(11944)(tmp, session_id);
|
|
}
|
|
if (session_id.type === constants.PLAYING) {
|
|
const obj13 = {};
|
|
const intl9 = require(1212) /* getSystemLocale */.intl;
|
|
obj13.text = intl9.string(require(1212) /* getSystemLocale */.t.BMTj28);
|
|
obj13.platformIcon = icon;
|
|
obj13.platformLabel = str;
|
|
obj = obj13;
|
|
} else if (session_id.type === constants.STREAMING) {
|
|
const obj14 = {};
|
|
const intl8 = require(1212) /* getSystemLocale */.intl;
|
|
obj14.text = intl8.string(require(1212) /* getSystemLocale */.t["Jpkr/q"]);
|
|
obj14.platformIcon = icon;
|
|
obj14.platformLabel = str;
|
|
obj = obj14;
|
|
} else {
|
|
if (obj29.isStageActivity(session_id)) {
|
|
const obj15 = {};
|
|
const intl7 = require(1212) /* getSystemLocale */.intl;
|
|
const obj16 = { name: session_id.name };
|
|
obj15.text = intl7.formatToPlainString(require(1212) /* getSystemLocale */.t.pW3Ip3, obj16);
|
|
obj = obj15;
|
|
} else {
|
|
if (session_id.type === constants.LISTENING) {
|
|
if (null != session_id.details) {
|
|
const obj17 = {};
|
|
const intl6 = require(1212) /* getSystemLocale */.intl;
|
|
const obj18 = { name: session_id.name };
|
|
obj17.text = intl6.formatToPlainString(require(1212) /* getSystemLocale */.t["b+lA5+"], obj18);
|
|
obj17.platformIcon = icon;
|
|
obj17.platformLabel = str;
|
|
obj = obj17;
|
|
}
|
|
}
|
|
if (session_id.type === constants.LISTENING) {
|
|
const obj19 = {};
|
|
const intl5 = require(1212) /* getSystemLocale */.intl;
|
|
obj19.text = intl5.string(require(1212) /* getSystemLocale */.t.dBISa6);
|
|
obj19.platformIcon = icon;
|
|
obj19.platformLabel = str;
|
|
obj = obj19;
|
|
} else {
|
|
if (session_id.type === constants.WATCHING) {
|
|
if (null != session_id.details) {
|
|
const obj20 = {};
|
|
const intl4 = require(1212) /* getSystemLocale */.intl;
|
|
const obj21 = { name: session_id.name };
|
|
obj20.text = intl4.formatToPlainString(require(1212) /* getSystemLocale */.t.mqdfDc, obj21);
|
|
obj20.platformIcon = icon;
|
|
obj20.platformLabel = str;
|
|
obj = obj20;
|
|
}
|
|
}
|
|
if (session_id.type === constants.WATCHING) {
|
|
const obj22 = {};
|
|
const intl3 = require(1212) /* getSystemLocale */.intl;
|
|
obj22.text = intl3.string(require(1212) /* getSystemLocale */.t.GpNXjC);
|
|
obj22.platformIcon = icon;
|
|
obj22.platformLabel = str;
|
|
obj = obj22;
|
|
} else {
|
|
if (session_id.type === constants.COMPETING) {
|
|
if (null != session_id.details) {
|
|
const obj23 = {};
|
|
const intl2 = require(1212) /* getSystemLocale */.intl;
|
|
const obj24 = { name: session_id.name };
|
|
obj23.text = intl2.formatToPlainString(require(1212) /* getSystemLocale */.t.oHF7Ch, obj24);
|
|
obj23.platformIcon = icon;
|
|
obj23.platformLabel = str;
|
|
obj = obj23;
|
|
}
|
|
}
|
|
if (session_id.type === constants.COMPETING) {
|
|
const obj25 = {};
|
|
const intl = require(1212) /* getSystemLocale */.intl;
|
|
obj25.text = intl.string(require(1212) /* getSystemLocale */.t.OzCsIA);
|
|
obj25.platformIcon = icon;
|
|
obj25.platformLabel = str;
|
|
obj = obj25;
|
|
} else {
|
|
obj = { text: undefined, platformIcon: icon, platformLabel: str };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj29 = require(9012) /* unpackStageChannelParty */;
|
|
}
|
|
return obj;
|
|
};
|