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

71 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 12796
// Function ID: 12797
2026-07-20 16:05:17 +00:00
// Name: UnlockWithNitroButton
2026-09-02 09:53:35 +00:00
// Dependencies: [19, 6092, 7312, 675, 21, 586, 6095, 12778, 1233, 4929, 4474, 8104, 2]
2026-07-20 16:05:17 +00:00
// Exports: UnlockWithNitroButton
2026-09-02 09:53:35 +00:00
// Module 12796 (UnlockWithNitroButton)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-09-02 09:53:35 +00:00
import initialize from "initialize" /* 586 */;
2026-09-01 10:26:29 +00:00
import CollapsingText from "CollapsingText" /* 4929 */;
2026-09-02 09:53:35 +00:00
import NitroWheelIcon from "NitroWheelIcon" /* 8104 */;
import useOpenNitroSubscribeActionSheetDefault from "useOpenNitroSubscribeActionSheet" /* 12778 */;
import closure_3 from "updateProduct" /* 6092 */;
import closure_4 from "map" /* 7312 */;
import { ShopCtaEnum } from "items" /* 675 */;
2026-08-24 06:08:38 +00:00
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) {
2026-09-02 09:53:35 +00:00
const intl = tmp(1233).intl;
text = intl.string(tmp(1233).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-09-01 10:26:29 +00:00
tmp4Result = tmp4(tmp(4474).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
};