164 lines
7 KiB
TypeScript
164 lines
7 KiB
TypeScript
// Module ID: 9644
|
|
// Function ID: 9645
|
|
// Name: PerkRow
|
|
// Dependencies: [19, 17, 5672, 676, 1876, 21, 9645, 1236, 712, 9646, 9647, 4189, 1297, 4185, 709, 6331, 6571, 1474, 5515, 4618, 698, 9321, 4717, 7699, 9648, 2]
|
|
// Exports: default
|
|
|
|
// Module 9644 (PerkRow)
|
|
import componentDidMount from "componentDidMount";
|
|
import get_ActivityIndicator from "useWindowDimensions";
|
|
import updateProduct from "updateProduct";
|
|
import ME from "ME";
|
|
import GuildFeatures from "GuildFeatures";
|
|
import jsxProd from "openPremiumModal";
|
|
import createCacheKey from "createCacheKey";
|
|
|
|
let c10;
|
|
let c4;
|
|
let c5;
|
|
let c9;
|
|
let closure_12;
|
|
let closure_14;
|
|
let closure_15;
|
|
let closure_6;
|
|
let map1;
|
|
let metroImportAll;
|
|
let unpackModuleId;
|
|
const require = arg1;
|
|
function PerkRow(perk) {
|
|
perk = perk.perk;
|
|
const tmp = callback2();
|
|
const items = [tmp.perkRow, ];
|
|
let lastPerkRow;
|
|
if (perk.isLastPerk) {
|
|
lastPerkRow = tmp.lastPerkRow;
|
|
}
|
|
let obj = { style: items, children: null };
|
|
items[1] = lastPerkRow;
|
|
obj = { style: tmp.perkIcon, source: perk.icon, disableColor: null == perk.color, color: perk.color };
|
|
const items1 = [callback(require(1297) /* Button */.Icon, obj), ];
|
|
obj = { style: tmp.perkText, variant: "text-md/medium", color: "interactive-text-active", children: null };
|
|
obj[3] = perk.description();
|
|
items1[1] = callback(require(4185) /* Text */.Text, obj);
|
|
obj[1] = items1;
|
|
return closure_15(closure_4, obj);
|
|
}
|
|
({ View: c4, Image: c5, ScrollView: closure_6 } = get_ActivityIndicator);
|
|
({ AnalyticEvents: metroImportAll, AnalyticsSections: c9, AnalyticsObjects: c10 } = ME);
|
|
({ SubscriptionPlans: unpackModuleId, NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM: closure_12, PRICE_PLACEHOLDER: map1 } = GuildFeatures);
|
|
({ jsx: closure_14, jsxs: closure_15 } = jsxProd);
|
|
let obj = {
|
|
icon: require("registerAsset"),
|
|
description() {
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
return intl.string(require(1236) /* getSystemLocale */.t.uAfKTe);
|
|
},
|
|
color: require("Themes").unsafe_rawColors.PREMIUM_PERK_PURPLE
|
|
};
|
|
let items = [obj, , ];
|
|
obj = {
|
|
icon: require("registerAsset"),
|
|
description() {
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
return intl.formatToPlainString(require(1236) /* getSystemLocale */.t.aVSVBO, { numFreeGuildSubscriptions: closure_12 });
|
|
}
|
|
};
|
|
items[1] = obj;
|
|
obj = {
|
|
icon: require("registerAsset"),
|
|
description() {
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
return intl.string(require(1236) /* getSystemLocale */.t.pqHIf7);
|
|
},
|
|
color: require("Themes").unsafe_rawColors.PREMIUM_PERK_GREEN
|
|
};
|
|
items[2] = obj;
|
|
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: null, perkRow: null, lastPerkRow: null, perkIcon: null, perkText: null, imageHeader: null };
|
|
obj1[5] = { backgroundColor: require("Themes").colors.BACKGROUND_SURFACE_HIGH, borderRadius: require("Themes").radii.sm, marginTop: 16, marginBottom: 0, paddingHorizontal: 12, paddingVertical: 8, width: "100%" };
|
|
createCacheKey = { paddingVertical: 10, borderBottomColor: require("Themes").unsafe_rawColors.PRIMARY_560, borderBottomWidth: 1, flexDirection: "row", alignItems: "center" };
|
|
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);
|
|
let obj2 = { backgroundColor: require("Themes").colors.BACKGROUND_SURFACE_HIGH, borderRadius: require("Themes").radii.sm, marginTop: 16, marginBottom: 0, paddingHorizontal: 12, paddingVertical: 8, width: "100%" };
|
|
const result = require("updateProduct").fileFinishedImporting("modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx");
|
|
|
|
export default function StickersPremiumUpsellAlert(arg0) {
|
|
let onClose;
|
|
let require;
|
|
({ onClose, analyticsLocation: require } = arg0);
|
|
let analyticsLocations;
|
|
const tmp = callback2();
|
|
const effect = React.useEffect(() => {
|
|
if (!ready.isReady()) {
|
|
analyticsLocations(table[14]).wait(() => callback(table[15]).loadProducts());
|
|
const obj = analyticsLocations(table[14]);
|
|
}
|
|
}, []);
|
|
const tmp5 = analyticsLocations(6571)(PREMIUM_MONTH_TIER_2.PREMIUM_MONTH_TIER_2);
|
|
let priceString;
|
|
if (tmp5 != null) {
|
|
priceString = tmp5.priceString;
|
|
}
|
|
analyticsLocations = tmp3(5515)().analyticsLocations;
|
|
let obj = { cancelText: null, confirmColor: null, confirmText: null, onConfirm: null, onClose: null, onCancel: null, style: null, children: null };
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj[0] = intl.string(require(1236) /* getSystemLocale */.t.f3Pet9);
|
|
obj[1] = require(1297) /* Button */.ButtonColors.GREEN;
|
|
const intl2 = require(1236) /* getSystemLocale */.intl;
|
|
obj[2] = intl2.string(require(1236) /* getSystemLocale */.t.o3Tnif);
|
|
obj[3] = function onConfirm() {
|
|
let obj = analyticsLocations(outer1_2[20]);
|
|
obj = { location: null };
|
|
obj = {};
|
|
const merged = Object.assign(closure_0);
|
|
obj.section = outer1_9.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
|
|
obj.object = outer1_10.BUTTON_CTA;
|
|
obj[0] = obj;
|
|
obj.track(outer1_8.PREMIUM_PROMOTION_OPENED, obj);
|
|
analyticsLocations(outer1_2[21])({ analyticsLocations });
|
|
};
|
|
obj[4] = onClose;
|
|
obj[5] = onClose;
|
|
const items = [tmp.alert, ];
|
|
let shortHeightAlert = null;
|
|
if (analyticsLocations(1474)().height <= 580) {
|
|
shortHeightAlert = tmp.shortHeightAlert;
|
|
}
|
|
items[1] = shortHeightAlert;
|
|
obj[6] = items;
|
|
obj = { style: tmp.closeContainer, children: null };
|
|
obj = { accessibilityRole: "button", accessibilityLabel: "close", onPress: onClose, children: null };
|
|
const obj1 = { source: null };
|
|
obj1[0] = analyticsLocations(7699);
|
|
obj[3] = callback(require(1297) /* Button */.Icon, obj1);
|
|
obj[1] = callback(require(4717) /* PressableBase */.PressableOpacity, obj);
|
|
const items1 = [callback(closure_4, obj), ];
|
|
const obj2 = {
|
|
style: tmp.content,
|
|
onStartShouldSetResponder() {
|
|
return true;
|
|
},
|
|
children: null
|
|
};
|
|
const tmp3Result = analyticsLocations(4618);
|
|
const items2 = [callback(closure_5, { source: analyticsLocations(9648), style: tmp.imageHeader }), , ];
|
|
const obj4 = { style: tmp.description, variant: "text-md/medium", children: null };
|
|
const intl3 = tmp9(1236).intl;
|
|
if (priceString == null) {
|
|
priceString = closure_13;
|
|
}
|
|
const obj5 = { children: null };
|
|
obj4[2] = intl3.format(require(1236) /* getSystemLocale */.t.TBsJfQ, { monthlyPrice: priceString });
|
|
items2[1] = callback(require(4185) /* Text */.Text, obj4);
|
|
const obj3 = { source: analyticsLocations(9648), style: tmp.imageHeader };
|
|
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);
|
|
};
|