decord/source/modules/collectibles/native/UnlockWithNitroButton.tsx

71 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12046
// Function ID: 12047
2026-07-20 16:05:17 +00:00
// Name: UnlockWithNitroButton
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 5324, 5329, 678, 21, 589, 5327, 9618, 1236, 4751, 4739, 8027, 2]
2026-07-20 16:05:17 +00:00
// Exports: UnlockWithNitroButton
2026-08-24 06:08:38 +00:00
// Module 12046 (UnlockWithNitroButton)
import noopAll from "noop" /* 19 */;
import initialize from "initialize" /* 589 */;
import CollapsingText from "CollapsingText" /* 4751 */;
import NitroWheelIcon from "NitroWheelIcon" /* 8027 */;
import useOpenNitroSubscribeActionSheetDefault from "useOpenNitroSubscribeActionSheet" /* 9618 */;
import closure_3 from "updateProduct" /* 5324 */;
import closure_4 from "map" /* 5329 */;
import { ShopCtaEnum } from "items" /* 678 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
const result = require("set").fileFinishedImporting("modules/collectibles/native/UnlockWithNitroButton.tsx");
2026-07-20 16:05:17 +00:00
export const UnlockWithNitroButton = function UnlockWithNitroButton(shouldShrink) {
let flag = shouldShrink.shouldShrink;
if (flag === undefined) {
flag = false;
}
2026-07-23 10:11:24 +00:00
({ onTrackPress: require, text } = shouldShrink);
2026-08-24 06:08:38 +00:00
importDefault = undefined;
let obj = initialize;
const items = [closure_4, closure_3];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
let isPurchasingProductResult = null != isClaiming.isClaiming;
2026-07-20 16:05:17 +00:00
if (!isPurchasingProductResult) {
2026-07-29 08:29:29 +00:00
isPurchasingProductResult = purchasingProduct.isPurchasingProduct(callback(table[6]).ProductIds.GENERIC_CONSUMABLE);
2026-07-20 16:05:17 +00:00
}
return isPurchasingProductResult;
});
2026-08-24 06:08:38 +00:00
importDefault = useOpenNitroSubscribeActionSheetDefault();
2026-07-29 08:29:29 +00:00
if (text == null) {
const intl = tmp(1236).intl;
text = intl.string(tmp(1236).t.sEAnVH);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp4Result;
2026-07-20 16:05:17 +00:00
if (flag) {
2026-07-29 08:29:29 +00:00
obj = { variant: "text-xs/semibold", color: "text-overlay-light", allowFontScaling: false, children: null };
obj[3] = text;
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(tmp(4739).Text, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { textElement: tmp4Result, text: null, accessibilityLabel: null, variant: "primary", size: null, grow: true, icon: null, onPress: null, disabled: null };
let tmp6;
2026-07-20 16:05:17 +00:00
if (!flag) {
2026-07-29 08:29:29 +00:00
tmp6 = text;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp6;
obj[2] = text;
2026-07-20 16:05:17 +00:00
let str = "md";
if (flag) {
str = "sm";
}
2026-07-29 08:29:29 +00:00
obj[4] = str;
2026-08-24 06:08:38 +00:00
obj[6] = jsx(NitroWheelIcon.NitroWheelIcon, { size: "sm", color: "white" });
2026-07-29 08:29:29 +00:00
obj[7] = function onPress() {
if (closure_0 != null) {
2026-08-24 06:08:38 +00:00
tmp(closure_1_5.UNLOCK_WITH_NITRO);
2026-07-20 16:05:17 +00:00
}
callback2();
};
2026-07-29 08:29:29 +00:00
obj[8] = stateFromStores;
2026-08-24 06:08:38 +00:00
return jsx(CollapsingText.BaseTextButton, { textElement: tmp4Result, text: null, accessibilityLabel: null, variant: "primary", size: null, grow: true, icon: null, onPress: null, disabled: null });
2026-07-20 16:05:17 +00:00
};