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

98 lines
3.8 KiB
TypeScript
Raw Normal View History

// Module ID: 15640
// Function ID: 15641
// Name: AppIconRows
// Dependencies: [32, 19, 17, 1372, 21, 4638, 9467, 5773, 1115, 15641, 13554, 504, 1886, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 15640 (AppIconRows)
import initialize from "initialize" /* 504 */;
import PremiumTypeUtils from "PremiumTypeUtils" /* 1886 */;
import AppIconTypes from "AppIconTypes" /* 9467 */;
import AppIconUtils from "AppIconUtils" /* 13554 */;
import AppIconRowDefault from "AppIconRow" /* 15641 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import UserStore from "UserStore" /* 1372 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-20 16:05:17 +00:00
function BackwardsCompatibleAppIconRows(arg0) {
if (arg0 == null) {
throw new TypeError("Cannot destructure 'undefined' or 'null'.");
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-08-24 06:08:38 +00:00
dependencyMap = undefined;
function onLongPress(noop) {
2026-07-20 16:05:17 +00:00
let tmp = null;
if (noop === AppIconTypes.FreemiumAppIconIds.DEFAULT) {
tmp = _undefined(true);
2026-07-20 16:05:17 +00:00
}
return tmp;
}
const tmp4 = closure_11();
[c1, c2] = onLongPress(noop.useState(false), 2);
2026-07-20 16:05:17 +00:00
const icons = merged.icons;
let obj = { style: tmp4.container, children: null };
const obj2 = { title: merged.title, accessibilityRole: "radiogroup", accessibilityLabel: null, hasIcons: true, children: null };
const intl = merged(1115).intl;
obj2.accessibilityLabel = intl.string(merged(1115).t.N4YDao);
obj2.children = 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 = showEasterEgg;
2026-07-29 08:29:29 +00:00
obj.onLongPress = onLongPress;
return createElement(AppIconRowDefault, {});
2026-07-20 16:05:17 +00:00
});
obj.children = closure_8(merged(5773).TableRowGroup, obj2);
return closure_8(View, obj);
2026-07-20 16:05:17 +00:00
}
}
const View = fn(17).View;
const createElement = fn(19).createElement;
const jsxProd = fn(21);
({ jsx: closure_8, Fragment: closure_9, jsxs: c10 } = jsxProd);
const createStyles = fn(4638);
let closure_11 = createStyles.createStyles({ container: { padding: 16 }, bottomUpsellPadding: { paddingBottom: 56 } });
const size = fn(2);
const result = size.fileFinishedImporting("modules/app_icons/native/AppIconRows.tsx");
2026-07-20 16:05:17 +00:00
export default function AppIconRows(onSelect) {
onSelect = onSelect.onSelect;
const tmp = closure_11();
const appIcons = AppIconUtils.useAppIcons();
2026-07-29 08:29:29 +00:00
({ limitedTimeAppIcons, currentAppIcon, officialAppIcons } = appIcons);
const items = [UserStore];
const stateFromStores = initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
const isPremiumResult = PremiumTypeUtils.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) {
const obj4 = { hasNitro: isPremiumResult, icons: limitedTimeAppIcons, currentAppIcon, title: null, onSelect: null };
const intl = tmp2(1115).intl;
obj4.title = intl.string(tmp2(1115).t.anqaFd);
obj4.onSelect = onSelect;
tmp10 = React6(BackwardsCompatibleAppIconRows, obj4);
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;
}
const obj5 = { style: bottomUpsellPadding, children: null };
const obj6 = { 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(1115).intl;
stringResult = intl2.string(tmp2(1115).t.Ipxkog);
2026-07-20 16:05:17 +00:00
}
const obj7 = { children: null };
obj6.title = stringResult;
obj6.onSelect = onSelect;
obj5.children = React6(BackwardsCompatibleAppIconRows, obj6);
items1[1] = React6(View, obj5);
obj7.children = items1;
return closure_1_10(React7, obj7);
2026-07-20 16:05:17 +00:00
};