decord/alpha/source/modules/game_profile/GameProfileReviewUtils.tsx
2026-10-12 06:59:38 +00:00

80 lines
4 KiB
TypeScript

// Module ID: 8937
// Function ID: 8938
// Name: GameProfileReviewUtils
// Dependencies: [2040, 1126, 2]
// Exports: canShowLocalizedSteamReview, getSteamReviewScoreDescriptionColor, getSteamReviewScoreDescriptionIntl
// Module 8937 (GameProfileReviewUtils)
import intl11 from "intl" /* 1126 */;
import GameDetectionTypes from "GameDetectionTypes" /* 2040 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/game_profile/GameProfileReviewUtils.tsx");
export const getSteamReviewScoreDescriptionColor = function getSteamReviewScoreDescriptionColor(NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.NO_USER_REVIEWS === NO_USER_REVIEWS) {
return "text-subtle";
} else {
if (GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.VERY_POSITIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.POSITIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_POSITIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.MIXED === NO_USER_REVIEWS) {
return "steam-review-text-mixed";
} else {
if (GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_NEGATIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.NEGATIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.VERY_NEGATIVE !== NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE !== NO_USER_REVIEWS) {
return "text-subtle";
}
}
}
}
return "steam-review-text-negative";
}
}
}
}
}
return "steam-review-text-positive";
}
};
export const getSteamReviewScoreDescriptionIntl = function getSteamReviewScoreDescriptionIntl(result) {
if (GameDetectionTypes.SteamReviewScoreDescription.NO_USER_REVIEWS === result) {
const intl10 = tmp(1126).intl;
return intl10.string(intl11.t.CLMt8J);
} else if (GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE === result) {
const intl9 = tmp(1126).intl;
return intl9.string(intl11.t["75sx1S"]);
} else if (GameDetectionTypes.SteamReviewScoreDescription.VERY_POSITIVE === result) {
const intl8 = tmp(1126).intl;
return intl8.string(intl11.t["EkOVg+"]);
} else if (GameDetectionTypes.SteamReviewScoreDescription.POSITIVE === result) {
const intl7 = tmp(1126).intl;
return intl7.string(intl11.t.ZUkFtr);
} else if (GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_POSITIVE === result) {
const intl6 = tmp(1126).intl;
return intl6.string(intl11.t.M7Z09a);
} else if (GameDetectionTypes.SteamReviewScoreDescription.MIXED === result) {
const intl5 = tmp(1126).intl;
return intl5.string(intl11.t.c8yuHR);
} else if (GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_NEGATIVE === result) {
const intl4 = tmp(1126).intl;
return intl4.string(intl11.t.H0MSjG);
} else if (GameDetectionTypes.SteamReviewScoreDescription.NEGATIVE === result) {
const intl3 = tmp(1126).intl;
return intl3.string(intl11.t.vpLrgz);
} else if (GameDetectionTypes.SteamReviewScoreDescription.VERY_NEGATIVE === result) {
const intl2 = tmp(1126).intl;
return intl2.string(intl11.t["5spYuX"]);
} else if (GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE === result) {
const intl = tmp(1126).intl;
return intl.string(intl11.t.A8uk5J);
} else {
return null;
}
};
export const canShowLocalizedSteamReview = function canShowLocalizedSteamReview(steam) {
return null != steam && null != steam.localizedRating && null != steam.localizedRatingCount && null != steam.ratingCount && steam.localizedRatingCount >= 200 && steam.ratingCount >= 2000;
};