decord/source/modules/app_icons/native/AppIconRows.tsx

107 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 14488
// Function ID: 14489
2026-07-20 16:05:17 +00:00
// Name: BackwardsCompatibleAppIconRows
2026-07-29 08:29:29 +00:00
// Dependencies: [32, 19, 17, 1874, 21, 4189, 6584, 5554, 1236, 14489, 6582, 589, 1897, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 14488 (BackwardsCompatibleAppIconRows)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
2026-07-29 08:29:29 +00:00
import mergeGuildAvatar from "mergeGuildAvatar";
import { createElement } from "noop";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10;
let c9;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function BackwardsCompatibleAppIconRows(arg0) {
2026-07-29 08:29:29 +00:00
let c1;
let c2;
2026-07-20 16:05:17 +00:00
if (arg0 == null) {
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let merged = Object.assign(arg0, undefined);
2026-07-29 08:29:29 +00:00
c1 = undefined;
2026-07-23 10:11:24 +00:00
let dependencyMap;
2026-07-29 08:29:29 +00:00
function onLongPress(noop, arg1) {
2026-07-20 16:05:17 +00:00
let tmp = null;
2026-07-29 08:29:29 +00:00
if (noop === merged(_undefined2[6]).FreemiumAppIconIds.DEFAULT) {
tmp = _undefined2(true);
2026-07-20 16:05:17 +00:00
}
return tmp;
}
2026-07-29 08:29:29 +00:00
const tmp5 = callback2();
[c1, c2] = onLongPress(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const icons = merged.icons;
2026-07-29 08:29:29 +00:00
let obj = { style: null, children: null };
obj[0] = tmp5.container;
obj = { title: null, accessibilityRole: "radiogroup", accessibilityLabel: null, hasIcons: true, children: null };
obj[0] = merged.title;
const intl = merged(1236).intl;
obj[2] = intl.string(merged(1236).t.N4YDao);
obj[4] = icons.map((id) => {
2026-07-20 16:05:17 +00:00
const obj = {};
2026-07-23 10:11:24 +00:00
merged = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.key = id.id;
obj.icon = id;
obj.showEasterEgg = _undefined;
obj.onLongPress = onLongPress;
return outer1_7(_undefined(_undefined2[9]), obj);
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
obj[1] = callback(merged(5554).TableRowGroup, obj);
2026-07-20 16:05:17 +00:00
return callback(View, obj);
}
}
2026-07-29 08:29:29 +00:00
({ jsx: metroImportAll, Fragment: c9, jsxs: c10 } = jsxProd);
let closure_11 = createCacheKey.createStyles({ container: { padding: 16 }, bottomUpsellPadding: { paddingBottom: 56 } });
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("modules/app_icons/native/AppIconRows.tsx");
2026-07-20 16:05:17 +00:00
export default function AppIconRows(onSelect) {
let currentAppIcon;
let limitedTimeAppIcons;
2026-07-29 08:29:29 +00:00
let officialAppIcons;
2026-07-20 16:05:17 +00:00
onSelect = onSelect.onSelect;
2026-07-29 08:29:29 +00:00
let obj = require(6582) /* fetchCurrentAppIcon */;
2026-07-20 16:05:17 +00:00
const appIcons = obj.useAppIcons();
2026-07-29 08:29:29 +00:00
({ limitedTimeAppIcons, currentAppIcon, officialAppIcons } = appIcons);
let obj1 = require(589) /* initialize */;
const items = [mergeGuildAvatar];
const stateFromStores = obj1.useStateFromStores(items, () => currentUser.getCurrentUser());
let obj2 = require(1897) /* isPremiumAtLeast */;
2026-07-20 16:05:17 +00:00
const isPremiumResult = obj2.isPremium(stateFromStores);
2026-07-29 08:29:29 +00:00
const tmp7 = limitedTimeAppIcons.length > 0 && limitedTimeAppIcons.filter((isHidden) => !isHidden.isHidden).length > 0;
let tmp10 = null;
if (tmp7) {
obj = { hasNitro: null, icons: null, currentAppIcon: null, title: null, onSelect: null };
obj[0] = isPremiumResult;
obj[1] = limitedTimeAppIcons;
obj[2] = currentAppIcon;
const intl = tmp2(1236).intl;
obj[3] = intl.string(tmp2(1236).t.anqaFd);
obj[4] = onSelect;
tmp10 = callback(BackwardsCompatibleAppIconRows, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [tmp10, ];
2026-07-20 16:05:17 +00:00
let bottomUpsellPadding = !isPremiumResult;
2026-07-29 08:29:29 +00:00
if (!isPremiumResult) {
2026-07-20 16:05:17 +00:00
bottomUpsellPadding = tmp.bottomUpsellPadding;
}
2026-07-29 08:29:29 +00:00
obj = { style: bottomUpsellPadding, children: null };
obj1 = { hasNitro: isPremiumResult, icons: officialAppIcons, currentAppIcon, title: null, onSelect: null };
2026-07-20 16:05:17 +00:00
let stringResult;
2026-07-29 08:29:29 +00:00
if (tmp7) {
const intl2 = tmp2(1236).intl;
stringResult = intl2.string(tmp2(1236).t.Ipxkog);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2 = { children: null };
obj1[3] = stringResult;
obj1[4] = onSelect;
obj[1] = callback(BackwardsCompatibleAppIconRows, obj1);
items1[1] = callback(View, obj);
obj2[0] = items1;
return closure_10(closure_9, obj2);
2026-07-20 16:05:17 +00:00
};