decord/source/modules/quests/native/openQuestCollectibleRewardModal.tsx

66 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11004
// Function ID: 11005
2026-07-20 16:05:17 +00:00
// Name: QuestCollectibleRewardModalMessages
2026-08-24 06:08:38 +00:00
// Dependencies: [1922, 6753, 21, 4668, 712, 589, 10530, 10723, 4739, 1236, 7497, 10428, 2]
2026-07-20 16:05:17 +00:00
// Exports: openQuestCollectibleRewardModal
2026-08-24 06:08:38 +00:00
// Module 11004 (QuestCollectibleRewardModalMessages)
import initialize from "initialize" /* 589 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Text from "Text" /* 4739 */;
import getQuestLogger from "getQuestLogger" /* 7497 */;
import MODAL_KEYDefault from "MODAL_KEY" /* 10428 */;
import _getDefaultRewardName from "_getDefaultRewardName" /* 10530 */;
import useQuests from "useQuests" /* 10723 */;
import closure_3 from "mergeGuildAvatar" /* 1922 */;
import { QuestsExperimentLocations } from "QuestsExperimentLocations" /* 6753 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function QuestCollectibleRewardModalMessages(quest) {
quest = quest.quest;
2026-08-24 06:08:38 +00:00
const tmp = callback3();
let obj = initialize;
const items = [closure_3];
2026-07-29 08:29:29 +00:00
const stateFromStores = obj.useStateFromStores(items, () => currentUser.getCurrentUser());
2026-08-24 06:08:38 +00:00
obj1 = _getDefaultRewardName;
2026-07-20 16:05:17 +00:00
const defaultRewardNameWithArticle = obj1.getDefaultRewardNameWithArticle(quest.config, stateFromStores);
2026-07-29 08:29:29 +00:00
obj = { children: null };
2026-08-24 06:08:38 +00:00
const claimedCollectibleRewardMessage = useQuests.useClaimedCollectibleRewardMessage(quest.config);
2026-07-29 08:29:29 +00:00
obj = { variant: "heading-xl/bold", style: tmp.title, children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[2] = intl.format(getSystemLocale.t.YNaxMp, { itemName: defaultRewardNameWithArticle });
const items1 = [callback(Text.Text, obj), ];
2026-07-20 16:05:17 +00:00
obj1 = { variant: "text-md/medium", style: tmp.title, children: claimedCollectibleRewardMessage };
2026-08-24 06:08:38 +00:00
items1[1] = callback(Text.Text, obj1);
2026-07-29 08:29:29 +00:00
obj[0] = items1;
2026-07-20 16:05:17 +00:00
return callback2(closure_6, obj);
}
2026-07-29 08:29:29 +00:00
({ jsx: c5, Fragment: closure_6, jsxs: error } = jsxProd);
createCacheKey = { title: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { textAlign: "center", marginHorizontal: ThemesDefault.space.PX_32 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_8 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("modules/quests/native/openQuestCollectibleRewardModal.tsx");
2026-07-20 16:05:17 +00:00
export const openQuestCollectibleRewardModal = function openQuestCollectibleRewardModal(onSuccess) {
2026-07-23 10:11:24 +00:00
({ quest: require, product } = onSuccess);
2026-08-24 06:08:38 +00:00
let obj = getQuestLogger;
2026-07-20 16:05:17 +00:00
obj = { location: QuestsExperimentLocations.QUEST_HOME_MOBILE };
const questLogger = obj.getQuestLogger(obj);
if (null != product) {
2026-07-29 08:29:29 +00:00
obj = { product: null, renderMessages: null, onSuccess: null };
obj[0] = product;
obj[1] = function renderMessages() {
2026-08-24 06:08:38 +00:00
return closure_1_5(closure_1_9, { quest: closure_0 });
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[2] = onSuccess.onSuccess;
2026-08-24 06:08:38 +00:00
MODAL_KEYDefault.open(obj);
const obj4 = MODAL_KEYDefault;
2026-07-20 16:05:17 +00:00
} else {
questLogger.warn("Product is null");
}
};