decord/source/modules/game_profile/hooks/useSteamWebsiteUrl.tsx

72 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8423
2026-07-27 11:26:19 +00:00
// Function ID: 67276
2026-07-20 16:05:17 +00:00
// Name: buildSteamStoreUrl
2026-07-25 08:10:48 +00:00
// Dependencies: [4152, 653, 566, 8424, 8422, 1832, 2]
2026-07-20 16:05:17 +00:00
// Exports: useSteamWebsiteUrl
2026-07-25 08:10:48 +00:00
// Module 8423 (buildSteamStoreUrl)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { Distributors } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function buildSteamStoreUrl(arg0) {
return "https://store.steampowered.com/app/" + encodeURIComponent(arg0);
}
2026-07-23 10:11:24 +00:00
const result = require("initialize").fileFinishedImporting("modules/game_profile/hooks/useSteamWebsiteUrl.tsx");
2026-07-20 16:05:17 +00:00
export { buildSteamStoreUrl };
export const useSteamWebsiteUrl = function useSteamWebsiteUrl(id) {
2026-07-23 10:11:24 +00:00
const _require = id;
const items = [_isNativeReflectConstruct];
2026-07-20 16:05:17 +00:00
const items1 = [id];
2026-07-23 10:11:24 +00:00
return _require(566).useStateFromStores(items, () => {
if (null == id) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-23 10:11:24 +00:00
const game = outer1_2.getGame(id);
2026-07-20 16:05:17 +00:00
if (null == game) {
return null;
2026-07-23 10:11:24 +00:00
} else if (game.steamReleaseStatus === id(outer1_1[3]).SteamReleaseStatus.RETIRED_ABANDONED) {
2026-07-20 16:05:17 +00:00
return null;
} else {
const websites = game.websites;
2026-07-23 10:11:24 +00:00
const found = websites.find((category) => category.category === callback(outer2_1[4]).ThirdPartyGameApplicationWebsiteCategory.STEAM);
2026-07-20 16:05:17 +00:00
if (null != found) {
const url = found.url;
}
const thirdPartySkus = game.thirdPartySkus;
const found1 = thirdPartySkus.filter((distributor) => {
2026-07-23 10:11:24 +00:00
let tmp = distributor.distributor === outer2_3.STEAM;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = !callback(outer2_1[5]).isNullOrEmpty(distributor.id);
const obj = callback(outer2_1[5]);
2026-07-20 16:05:17 +00:00
}
return tmp;
});
const first = found1[0];
2026-07-23 10:11:24 +00:00
id = undefined;
2026-07-20 16:05:17 +00:00
if (null != first) {
id = first.id;
}
let tmp6 = null;
if (!obj.isNullOrEmpty(id)) {
2026-07-23 10:11:24 +00:00
tmp6 = outer1_4(id);
2026-07-20 16:05:17 +00:00
}
if (found1.length <= 1) {
if (null == tmp6) {
let tmp9 = null;
if (null != url) {
tmp9 = url;
}
tmp6 = tmp9;
}
let tmp8 = tmp6;
} else {
tmp8 = url;
}
return tmp8;
}
}
}, items1);
};