decord/alpha/source/modules/collectibles/native/UnlockWithNitroButton.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

68 lines
2.6 KiB
TypeScript

// Module ID: 12933
// Function ID: 12934
// Name: UnlockWithNitroButton
// Dependencies: [19, 6854, 7173, 1076, 21, 504, 6857, 12919, 1115, 5478, 4862, 8318, 2]
// Exports: UnlockWithNitroButton
// Module 12933 (UnlockWithNitroButton)
import initialize from "initialize" /* 504 */;
import BaseTextButton from "BaseTextButton" /* 5478 */;
import ProductIds from "ProductIds" /* 6857 */;
import NitroWheelIcon from "NitroWheelIcon" /* 8318 */;
import useOpenNitroSubscribeActionSheetDefault from "useOpenNitroSubscribeActionSheet" /* 12919 */;
import noop from "module_19" /* 19 */;
import IAPStore from "IAPStore" /* 6854 */;
import CollectiblesPurchaseStore from "CollectiblesPurchaseStore" /* 7173 */;
require = fn;
const ShopCtaEnum = fn(1076).ShopCtaEnum;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/collectibles/native/UnlockWithNitroButton.tsx");
export const UnlockWithNitroButton = function UnlockWithNitroButton(shouldShrink) {
let flag = shouldShrink.shouldShrink;
if (flag === undefined) {
flag = false;
}
({ onTrackPress: require, text } = shouldShrink);
const items = [CollectiblesPurchaseStore, IAPStore];
const stateFromStores = initialize.useStateFromStores(items, () => {
let isPurchasingProductResult = null != isClaiming.isClaiming;
if (!isPurchasingProductResult) {
isPurchasingProductResult = purchasingProduct.isPurchasingProduct(ProductIds.ProductIds.GENERIC_CONSUMABLE);
}
return isPurchasingProductResult;
});
importDefault = useOpenNitroSubscribeActionSheetDefault();
if (text == null) {
const intl = tmp(1115).intl;
text = intl.string(tmp(1115).t.sEAnVH);
}
let tmp4Result;
if (flag) {
const obj2 = { variant: "text-xs/semibold", color: "text-overlay-light", allowFontScaling: false, children: text };
tmp4Result = tmp4(tmp(4862).Text, obj2);
}
const obj3 = { textElement: tmp4Result, text: null, accessibilityLabel: null, variant: "primary", size: null, grow: true, icon: null, onPress: null, disabled: null };
let tmp6;
if (!flag) {
tmp6 = text;
}
obj3.text = tmp6;
obj3.accessibilityLabel = text;
let str = "md";
if (flag) {
str = "sm";
}
obj3.size = str;
obj3.icon = jsx(NitroWheelIcon.NitroWheelIcon, { size: "sm", color: "white" });
obj3.onPress = function onPress() {
if (require != null) {
tmp(ShopCtaEnum.UNLOCK_WITH_NITRO);
}
closure_1();
};
obj3.disabled = stateFromStores;
return jsx(BaseTextButton.BaseTextButton, { textElement: tmp4Result, text: null, accessibilityLabel: null, variant: "primary", size: null, grow: true, icon: null, onPress: null, disabled: null });
};