decord/source/modules/app_icons/native/AppIconRows.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

97 lines
3.8 KiB
TypeScript

// Module ID: 15613
// Function ID: 15614
// Name: AppIconRows
// Dependencies: [32, 19, 17, 1371, 21, 4636, 9454, 5768, 1114, 15614, 13537, 504, 1885, 2]
// Exports: default
// Module 15613 (AppIconRows)
import initialize from "initialize" /* 504 */;
import PremiumTypeUtils from "PremiumTypeUtils" /* 1885 */;
import AppIconTypes from "AppIconTypes" /* 9454 */;
import AppIconUtils from "AppIconUtils" /* 13537 */;
import AppIconRowDefault from "AppIconRow" /* 15614 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import UserStore from "UserStore" /* 1371 */;
require = fn;
function BackwardsCompatibleAppIconRows(arg0) {
if (arg0 == null) {
throw new TypeError("Cannot destructure 'undefined' or 'null'.");
} else {
let merged = Object.assign(arg0, undefined);
c1 = undefined;
dependencyMap = undefined;
function onLongPress(noop) {
let tmp = null;
if (noop === AppIconTypes.FreemiumAppIconIds.DEFAULT) {
tmp = _undefined(true);
}
return tmp;
}
const tmp4 = closure_11();
[c1, c2] = onLongPress(noop.useState(false), 2);
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(1114).intl;
obj2.accessibilityLabel = intl.string(merged(1114).t.N4YDao);
obj2.children = icons.map((id) => {
const obj = {};
merged = Object.assign(merged);
obj.key = id.id;
obj.icon = id;
obj.showEasterEgg = showEasterEgg;
obj.onLongPress = onLongPress;
return createElement(AppIconRowDefault, {});
});
obj.children = closure_8(merged(5768).TableRowGroup, obj2);
return closure_8(View, obj);
}
}
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(4636);
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");
export default function AppIconRows(onSelect) {
onSelect = onSelect.onSelect;
const tmp = closure_11();
const appIcons = AppIconUtils.useAppIcons();
({ limitedTimeAppIcons, currentAppIcon, officialAppIcons } = appIcons);
const items = [UserStore];
const stateFromStores = initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
const isPremiumResult = PremiumTypeUtils.isPremium(stateFromStores);
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(1114).intl;
obj4.title = intl.string(tmp2(1114).t.anqaFd);
obj4.onSelect = onSelect;
tmp10 = React6(BackwardsCompatibleAppIconRows, obj4);
}
const items1 = [tmp10, ];
let bottomUpsellPadding = !isPremiumResult;
if (!isPremiumResult) {
bottomUpsellPadding = tmp.bottomUpsellPadding;
}
const obj5 = { style: bottomUpsellPadding, children: null };
const obj6 = { hasNitro: isPremiumResult, icons: officialAppIcons, currentAppIcon, title: null, onSelect: null };
let stringResult;
if (tmp7) {
const intl2 = tmp2(1114).intl;
stringResult = intl2.string(tmp2(1114).t.Ipxkog);
}
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);
};