68 lines
2.6 KiB
TypeScript
68 lines
2.6 KiB
TypeScript
// Module ID: 13409
|
|
// Function ID: 13410
|
|
// Name: UnlockWithNitroButton
|
|
// Dependencies: [19, 7433, 7753, 1076, 21, 504, 7436, 13396, 1115, 5145, 4718, 8900, 2]
|
|
// Exports: UnlockWithNitroButton
|
|
|
|
// Module 13409 (UnlockWithNitroButton)
|
|
import initialize from "initialize" /* 504 */;
|
|
import BaseTextButton from "BaseTextButton" /* 5145 */;
|
|
import ProductIds from "ProductIds" /* 7436 */;
|
|
import NitroWheelIcon from "NitroWheelIcon" /* 8900 */;
|
|
import useOpenNitroSubscribeActionSheetDefault from "useOpenNitroSubscribeActionSheet" /* 13396 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import IAPStore from "IAPStore" /* 7433 */;
|
|
import CollectiblesPurchaseStore from "CollectiblesPurchaseStore" /* 7753 */;
|
|
|
|
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(4718).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 });
|
|
};
|