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

70 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 11847
// Function ID: 91829
2026-07-20 16:05:17 +00:00
// Name: UnlockWithNitroButton
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 5619, 5786, 655, 33, 566, 5622, 8692, 1212, 4545, 4127, 6570, 2]
2026-07-20 16:05:17 +00:00
// Exports: UnlockWithNitroButton
2026-07-27 11:26:19 +00:00
// Module 11847 (UnlockWithNitroButton)
2026-07-23 10:11:24 +00:00
import "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
import { ShopCtaEnum } from "items";
import { jsx } from "jsxProd";
const require = arg1;
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/collectibles/native/UnlockWithNitroButton.tsx");
2026-07-20 16:05:17 +00:00
export const UnlockWithNitroButton = function UnlockWithNitroButton(shouldShrink) {
2026-07-23 10:11:24 +00:00
let require;
2026-07-20 16:05:17 +00:00
let text;
let flag = shouldShrink.shouldShrink;
if (flag === undefined) {
flag = false;
}
2026-07-23 10:11:24 +00:00
({ onTrackPress: require, text } = shouldShrink);
2026-07-20 16:05:17 +00:00
let importDefault;
2026-07-23 10:11:24 +00:00
let obj = require(566) /* initialize */;
const items = [closure_4, _isNativeReflectConstruct];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
2026-07-23 10:11:24 +00:00
let isPurchasingProductResult = null != outer1_4.isClaiming;
2026-07-20 16:05:17 +00:00
if (!isPurchasingProductResult) {
2026-07-23 10:11:24 +00:00
isPurchasingProductResult = outer1_3.isPurchasingProduct(outer1_0(outer1_2[6]).ProductIds.GENERIC_CONSUMABLE);
2026-07-20 16:05:17 +00:00
}
return isPurchasingProductResult;
});
2026-07-25 08:10:48 +00:00
importDefault = importDefault(8692)();
2026-07-20 16:05:17 +00:00
if (null == text) {
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
text = intl.string(require(1212) /* getSystemLocale */.t.sEAnVH);
2026-07-20 16:05:17 +00:00
}
obj = {};
let tmp5;
if (flag) {
2026-07-23 10:11:24 +00:00
obj = { variant: "text-xs/semibold", color: "text-overlay-light", allowFontScaling: false, children: text };
2026-07-25 08:10:48 +00:00
tmp5 = jsx(require(4127) /* Text */.Text, { variant: "text-xs/semibold", color: "text-overlay-light", allowFontScaling: false, children: text });
2026-07-20 16:05:17 +00:00
}
obj.textElement = tmp5;
let tmp9;
if (!flag) {
tmp9 = text;
}
obj.text = tmp9;
obj.accessibilityLabel = text;
obj.variant = "primary";
let str = "md";
if (flag) {
str = "sm";
}
obj.size = str;
obj.grow = true;
2026-07-25 08:10:48 +00:00
obj.icon = jsx(require(6570) /* NitroWheelIcon */.NitroWheelIcon, { size: "sm", color: "white" });
2026-07-20 16:05:17 +00:00
obj.onPress = function onPress() {
if (null != callback) {
2026-07-23 10:11:24 +00:00
callback(outer1_5.UNLOCK_WITH_NITRO);
2026-07-20 16:05:17 +00:00
}
callback2();
};
obj.disabled = stateFromStores;
2026-07-25 08:10:48 +00:00
return jsx(require(4545) /* CollapsingText */.BaseTextButton, {});
2026-07-20 16:05:17 +00:00
};