decord/source/modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx

157 lines
6.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10277
// Function ID: 10278
2026-07-20 16:05:17 +00:00
// Name: PerkRow
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 5324, 676, 1924, 21, 10278, 1236, 712, 10279, 10280, 4668, 1297, 4739, 709, 7428, 7973, 1494, 7177, 4768, 698, 9362, 5438, 8182, 10281, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 10277 (PerkRow)
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Button from "Button" /* 1297 */;
import Text from "Text" /* 4739 */;
import PressableBase from "PressableBase" /* 5438 */;
import registerAssetDefault from "registerAsset" /* 10278 */;
import registerAssetDefault2 from "registerAsset" /* 10279 */;
import registerAssetDefault3 from "registerAsset" /* 10280 */;
import closure_3 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_7 from "updateProduct" /* 5324 */;
import ME from "ME" /* 676 */;
import GuildFeatures from "GuildFeatures" /* 1924 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function PerkRow(perk) {
perk = perk.perk;
const tmp = callback2();
2026-08-24 06:08:38 +00:00
items = [tmp.perkRow, ];
2026-07-20 16:05:17 +00:00
let lastPerkRow;
if (perk.isLastPerk) {
lastPerkRow = tmp.lastPerkRow;
}
2026-07-29 08:29:29 +00:00
let obj = { style: items, children: null };
2026-07-20 16:05:17 +00:00
items[1] = lastPerkRow;
obj = { style: tmp.perkIcon, source: perk.icon, disableColor: null == perk.color, color: perk.color };
2026-08-24 06:08:38 +00:00
const items1 = [callback(Button.Icon, obj), ];
obj = { style: tmp.perkText, variant: "text-md/medium", color: "interactive-text-active", children: perk.description() };
items1[1] = callback(Text.Text, obj);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-07-24 07:16:23 +00:00
return closure_15(closure_4, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ View: c4, Image: c5, ScrollView: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ AnalyticEvents: closure_8, AnalyticsSections: c9, AnalyticsObjects: c10 } = ME);
2026-07-29 08:29:29 +00:00
({ SubscriptionPlans: unpackModuleId, NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM: closure_12, PRICE_PLACEHOLDER: map1 } = GuildFeatures);
2026-07-24 07:16:23 +00:00
({ jsx: closure_14, jsxs: closure_15 } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = {
2026-08-24 06:08:38 +00:00
icon: registerAssetDefault,
2026-07-20 16:05:17 +00:00
description() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.uAfKTe);
2026-07-20 16:05:17 +00:00
},
2026-08-24 06:08:38 +00:00
color: ThemesDefault.unsafe_rawColors.PREMIUM_PERK_PURPLE
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
let items = [obj, , ];
2026-07-20 16:05:17 +00:00
obj = {
2026-08-24 06:08:38 +00:00
icon: registerAssetDefault2,
2026-07-20 16:05:17 +00:00
description() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.formatToPlainString(getSystemLocale.t.aVSVBO, { numFreeGuildSubscriptions: closure_12 });
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
2026-08-24 06:08:38 +00:00
icon: registerAssetDefault3,
2026-07-20 16:05:17 +00:00
description() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.pqHIf7);
2026-07-20 16:05:17 +00:00
},
2026-08-24 06:08:38 +00:00
color: ThemesDefault.unsafe_rawColors.PREMIUM_PERK_GREEN
2026-07-20 16:05:17 +00:00
};
items[2] = obj;
2026-08-24 06:08:38 +00:00
let obj1 = { alert: { paddingTop: 18 }, shortHeightAlert: { height: 500 }, content: { alignItems: "center" }, closeContainer: { flexDirection: "row-reverse", width: "100%", marginBottom: 16 }, description: { textAlign: "center", lineHeight: 20 }, perks: { backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, borderRadius: ThemesDefault.radii.sm, marginTop: 16, marginBottom: 0, paddingHorizontal: 12, paddingVertical: 8, width: "100%" }, perkRow: null, lastPerkRow: null, perkIcon: null, perkText: null, imageHeader: null };
createCacheKey = { paddingVertical: 10, borderBottomColor: ThemesDefault.unsafe_rawColors.PRIMARY_560, borderBottomWidth: 1, flexDirection: "row", alignItems: "center" };
2026-07-29 08:29:29 +00:00
obj1[6] = createCacheKey;
obj1[7] = { borderBottomWidth: 0 };
obj1[8] = { width: 24, marginRight: 20 };
obj1[9] = { lineHeight: 20, flexShrink: 1 };
obj1[10] = { marginBottom: 12 };
let closure_17 = createCacheKey.createStyles(obj1);
2026-08-24 06:08:38 +00:00
let obj2 = { backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, borderRadius: ThemesDefault.radii.sm, marginTop: 16, marginBottom: 0, paddingHorizontal: 12, paddingVertical: 8, width: "100%" };
const result = require("set").fileFinishedImporting("modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx");
2026-07-20 16:05:17 +00:00
export default function StickersPremiumUpsellAlert(arg0) {
2026-07-23 10:11:24 +00:00
({ onClose, analyticsLocation: require } = arg0);
let analyticsLocations;
2026-07-20 16:05:17 +00:00
const tmp = callback2();
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
if (!ready.isReady()) {
analyticsLocations(table[14]).wait(() => callback(table[15]).loadProducts());
const obj = analyticsLocations(table[14]);
2026-07-20 16:05:17 +00:00
}
}, []);
2026-08-24 06:08:38 +00:00
const tmp5 = analyticsLocations(7973)(PREMIUM_MONTH_TIER_2.PREMIUM_MONTH_TIER_2);
2026-07-20 16:05:17 +00:00
let priceString;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
priceString = tmp5.priceString;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
analyticsLocations = tmp3(7177)().analyticsLocations;
2026-07-29 08:29:29 +00:00
let obj = { cancelText: null, confirmColor: null, confirmText: null, onConfirm: null, onClose: null, onCancel: null, style: null, children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.f3Pet9);
obj[1] = Button.ButtonColors.GREEN;
const intl2 = getSystemLocale.intl;
obj[2] = intl2.string(getSystemLocale.t.o3Tnif);
2026-07-29 08:29:29 +00:00
obj[3] = function onConfirm() {
2026-08-24 06:08:38 +00:00
let obj = analyticsLocations(closure_1_2[20]);
2026-07-29 08:29:29 +00:00
obj = { location: null };
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-22 07:54:56 +00:00
const merged = Object.assign(closure_0);
2026-08-24 06:08:38 +00:00
obj.section = closure_1_9.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
obj.object = closure_1_10.BUTTON_CTA;
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_8.PREMIUM_PROMOTION_OPENED, obj);
analyticsLocations(closure_1_2[21])({ analyticsLocations });
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[4] = onClose;
obj[5] = onClose;
2026-08-24 06:08:38 +00:00
items = [tmp.alert, ];
2026-07-20 16:05:17 +00:00
let shortHeightAlert = null;
2026-08-15 05:55:55 +00:00
if (analyticsLocations(1494)().height <= 580) {
2026-07-20 16:05:17 +00:00
shortHeightAlert = tmp.shortHeightAlert;
}
items[1] = shortHeightAlert;
2026-07-29 08:29:29 +00:00
obj[6] = items;
obj = { style: tmp.closeContainer, children: null };
obj = { accessibilityRole: "button", accessibilityLabel: "close", onPress: onClose, children: null };
2026-08-24 06:08:38 +00:00
const tmp3Result = analyticsLocations(4768);
obj[3] = callback(Button.Icon, { source: analyticsLocations(8182) });
obj[1] = callback(PressableBase.PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
const items1 = [callback(closure_4, obj), ];
2026-07-29 08:29:29 +00:00
const obj2 = {
2026-07-20 16:05:17 +00:00
style: tmp.content,
onStartShouldSetResponder() {
return true;
2026-07-29 08:29:29 +00:00
},
children: null
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj1 = { source: analyticsLocations(8182) };
const items2 = [callback(closure_5, { source: analyticsLocations(10281), style: tmp.imageHeader }), , ];
2026-07-29 08:29:29 +00:00
const obj4 = { style: tmp.description, variant: "text-md/medium", children: null };
const intl3 = tmp9(1236).intl;
if (priceString == null) {
2026-07-24 07:16:23 +00:00
priceString = closure_13;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj5 = { children: null };
2026-08-24 06:08:38 +00:00
obj4[2] = intl3.format(getSystemLocale.t.TBsJfQ, { monthlyPrice: priceString });
items2[1] = callback(Text.Text, obj4);
const obj3 = { source: analyticsLocations(10281), style: tmp.imageHeader };
2026-07-29 08:29:29 +00:00
const tmp13 = closure_6;
items2[2] = callback(closure_4, { style: tmp.perks, children: items.map((perk) => callback(closure_18, { perk, isLastPerk: arg1 === length.length - 1 }, arg1)) });
obj2[2] = items2;
obj5[0] = closure_15(closure_4, obj2);
items1[1] = callback(tmp13, obj5);
obj[7] = items1;
return closure_15(tmp3Result, obj);
2026-07-20 16:05:17 +00:00
};