decord/source/modules/user_profile/native/UserProfileDismissibleUpsells.tsx

156 lines
8.1 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 12114
// Function ID: 94913
2026-07-20 16:05:17 +00:00
// Name: UserProfileDismissibleUpsells
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 27, 1850, 8043, 6173, 1345, 33, 4131, 689, 12115, 8045, 566, 3777, 9602, 1334, 1273, 4127, 1212, 4661, 5119, 4544, 6570, 11253, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 12114 (UserProfileDismissibleUpsells)
2026-07-23 10:11:24 +00:00
import result from "result";
import { View } from "get ActivityIndicator";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { TrackUserProfileActions } from "USER_PROFILE_TOOLTIP_DELAY";
import { ContentDismissActionType } from "ContentDismissActionType";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_8;
let closure_9;
const require = arg1;
({ jsx: closure_8, jsxs: closure_9 } = jsxProd);
let items = [...require("items").Gradients.PREMIUM_GUILD];
2026-07-20 16:05:17 +00:00
let closure_10 = items.reverse();
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = {};
_createForOfIteratorHelperLoose = { paddingVertical: 16, paddingHorizontal: 12, borderRadius: require("_createForOfIteratorHelperLoose").radii.lg, backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_SURFACE_HIGH };
_createForOfIteratorHelperLoose.upsellContainer = _createForOfIteratorHelperLoose;
_createForOfIteratorHelperLoose.customProfileThemeUpsellContainer = { backgroundColor: require("_createForOfIteratorHelperLoose").colors.PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME };
_createForOfIteratorHelperLoose.header = { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center" };
_createForOfIteratorHelperLoose.upsellButtonsContainer = { display: "flex", flexDirection: "row", justifyContent: "space-between", flexWrap: "wrap", gap: 10, marginTop: 12 };
_createForOfIteratorHelperLoose.upsellButton = { flex: 1 };
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose.createStyles(_createForOfIteratorHelperLoose);
let obj1 = { backgroundColor: require("_createForOfIteratorHelperLoose").colors.PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME };
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/user_profile/native/UserProfileDismissibleUpsells.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileDismissibleUpsells(navigateToShop) {
navigateToShop = navigateToShop.navigateToShop;
const navigateToPremium = navigateToShop.navigateToPremium;
2026-07-23 10:11:24 +00:00
const hasCustomProfileTheme = navigateToShop.hasCustomProfileTheme;
const React = _createForOfIteratorHelperLoose();
let obj = navigateToShop(hasCustomProfileTheme[9]);
2026-07-20 16:05:17 +00:00
const isPrivacyNoticeVisible = obj.useIsPrivacyNoticeVisible();
2026-07-23 10:11:24 +00:00
const trackUserProfileAction = navigateToShop(hasCustomProfileTheme[10]).useUserProfileAnalyticsContext().trackUserProfileAction;
let obj2 = navigateToShop(hasCustomProfileTheme[10]);
let items = [_isNativeReflectConstruct];
const stateFromStores = navigateToShop(hasCustomProfileTheme[11]).useStateFromStores(items, () => currentUser.getCurrentUser());
let obj3 = navigateToShop(hasCustomProfileTheme[11]);
_isNativeReflectConstruct = navigateToShop(hasCustomProfileTheme[12]).isPremium(stateFromStores);
let items1 = [navigateToShop, trackUserProfileAction];
2026-07-20 16:05:17 +00:00
let closure_6 = React.useCallback(() => {
trackUserProfileAction({ action: constants.VISIT_SHOP });
navigateToShop();
}, items1);
const items2 = [navigateToPremium, trackUserProfileAction];
let closure_7 = React.useCallback(() => {
trackUserProfileAction({ action: constants.GET_PREMIUM });
navigateToPremium();
}, items2);
const items3 = [navigateToPremium, trackUserProfileAction];
let closure_8 = React.useCallback(() => {
trackUserProfileAction({ action: constants.VIEW_PREMIUM_PERKS });
navigateToPremium();
}, items3);
if (isPrivacyNoticeVisible) {
let tmp3Result = tmp3(tmp4(tmp5[9]), {});
} else {
obj = {};
2026-07-23 10:11:24 +00:00
const items4 = [navigateToShop(tmp5[14]).DismissibleContent.USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS];
2026-07-20 16:05:17 +00:00
obj.contentTypes = items4;
obj.children = function children(markAsDismissed) {
2026-07-23 10:11:24 +00:00
markAsDismissed = markAsDismissed.markAsDismissed;
2026-07-20 16:05:17 +00:00
if (markAsDismissed.visibleContent !== navigateToShop(hasCustomProfileTheme[14]).DismissibleContent.USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS) {
return null;
} else {
2026-07-23 10:11:24 +00:00
let obj = { borderWidth: 2, direction: navigateToShop(hasCustomProfileTheme[15]).GradientBorder.Direction.VERTICAL, colors: outer1_10, borderRadius: navigateToPremium(hasCustomProfileTheme[8]).radii.lg };
2026-07-20 16:05:17 +00:00
obj = {};
const obj1 = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(result.upsellContainer);
2026-07-20 16:05:17 +00:00
if (hasCustomProfileTheme) {
2026-07-23 10:11:24 +00:00
let prop = result.customProfileThemeUpsellContainer;
2026-07-20 16:05:17 +00:00
} else {
prop = {};
}
const merged1 = Object.assign(prop);
obj.style = obj1;
2026-07-23 10:11:24 +00:00
const obj2 = { style: result.header };
2026-07-20 16:05:17 +00:00
let tmp8 = callback;
2026-07-23 10:11:24 +00:00
const obj3 = { accessibilityRole: "header", variant: "text-sm/semibold" };
2026-07-20 16:05:17 +00:00
let num2 = 17;
const intl = navigateToShop(hasCustomProfileTheme[17]).intl;
obj3.children = intl.string(navigateToShop(hasCustomProfileTheme[17]).t.EIYbj6);
const items = [callback(navigateToShop(hasCustomProfileTheme[16]).Text, obj3), ];
const obj4 = { accessibilityRole: "button" };
const intl2 = navigateToShop(hasCustomProfileTheme[17]).intl;
2026-07-23 10:11:24 +00:00
obj4.accessibilityLabel = intl2.string(navigateToShop(hasCustomProfileTheme[17]).t["6Xcq+Y"]);
2026-07-20 16:05:17 +00:00
obj4.onPress = function onPress() {
return markAsDismissed(constants.USER_DISMISS);
};
const obj5 = { size: "sm" };
obj4.children = callback(navigateToShop(hasCustomProfileTheme[19]).XSmallIcon, obj5);
items[1] = callback(navigateToShop(hasCustomProfileTheme[18]).PressableOpacity, obj4);
obj2.children = items;
2026-07-23 10:11:24 +00:00
const items1 = [outer1_9(trackUserProfileAction, obj2), ];
let obj6 = { style: result.upsellButtonsContainer };
let obj7 = { style: result.upsellButton };
2026-07-20 16:05:17 +00:00
let num5 = 20;
let string = navigateToShop(hasCustomProfileTheme[20]).Button;
2026-07-23 10:11:24 +00:00
let obj8 = { text: null, onPress: null, icon: null, iconPosition: "start", variant: "secondary", shiny: true };
2026-07-20 16:05:17 +00:00
const intl3 = navigateToShop(hasCustomProfileTheme[17]).intl;
const string2 = intl3.string;
const t = navigateToShop(hasCustomProfileTheme[17]).t;
2026-07-23 10:11:24 +00:00
if (_isNativeReflectConstruct) {
let string2Result = string2(t["0Q61kF"]);
2026-07-20 16:05:17 +00:00
} else {
string2Result = string2(t.x6rkDp);
}
obj8.text = string2Result;
2026-07-23 10:11:24 +00:00
obj8.onPress = _isNativeReflectConstruct ? callback : closure_7;
2026-07-20 16:05:17 +00:00
const obj9 = { size: "sm" };
obj8.icon = callback(navigateToShop(hasCustomProfileTheme[21]).NitroWheelIcon, obj9);
obj7.children = tmp8(string, obj8);
obj7 = [, ];
obj7[0] = tmp8(trackUserProfileAction, obj7);
tmp8 = trackUserProfileAction;
2026-07-23 10:11:24 +00:00
const obj10 = { style: result.upsellButton };
2026-07-20 16:05:17 +00:00
obj8 = navigateToShop(hasCustomProfileTheme[num5]).Button;
const obj11 = {};
const intl4 = navigateToShop(hasCustomProfileTheme[num2]).intl;
string = intl4.string;
num2 = string(navigateToShop(hasCustomProfileTheme[num2]).t.pWG4ze);
obj11.text = num2;
obj11.onPress = closure_6;
const obj12 = { size: "sm" };
obj11.icon = callback(navigateToShop(hasCustomProfileTheme[22]).ShopIcon, obj12);
obj11.iconPosition = "start";
obj11.variant = "secondary";
num5 = callback(obj8, obj11);
obj10.children = num5;
obj7[1] = callback(trackUserProfileAction, obj10);
obj6.children = obj7;
2026-07-23 10:11:24 +00:00
obj6 = outer1_9(tmp6, obj6);
2026-07-20 16:05:17 +00:00
items1[1] = obj6;
obj.children = items1;
2026-07-23 10:11:24 +00:00
obj = outer1_9(trackUserProfileAction, obj);
2026-07-20 16:05:17 +00:00
obj.children = obj;
callback(navigateToShop(hasCustomProfileTheme[15]).GradientBorder, obj);
const tmp23 = callback;
2026-07-23 10:11:24 +00:00
const tmp28 = outer1_9;
2026-07-20 16:05:17 +00:00
const tmp29 = trackUserProfileAction;
2026-07-23 10:11:24 +00:00
const tmp5 = outer1_9;
2026-07-20 16:05:17 +00:00
const tmp8Result = tmp8(trackUserProfileAction, obj7);
}
};
tmp3Result = tmp3(tmp4(tmp5[13]), obj);
const tmp4Result = tmp4(tmp5[13]);
}
return tmp3Result;
};