decord/source/modules/notification_settings/native/NotificationSettingChannelOverrides.native.tsx

139 lines
5.9 KiB
TypeScript
Raw Normal View History

2026-09-01 10:26:29 +00:00
// Module ID: 17376
// Function ID: 17377
// Dependencies: [32, 19, 17, 1391, 5479, 4130, 1922, 676, 21, 4478, 712, 589, 5594, 5480, 4674, 5454, 1236, 1351, 7775, 5599, 5605, 4981, 10639, 6221, 1297, 8910, 7778, 2]
2026-07-20 16:05:17 +00:00
2026-09-01 10:26:29 +00:00
// Module 17376
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-31 15:47:37 +00:00
import { isGuildReadableType } from "createChannelRecord" /* 1391 */;
2026-09-01 10:26:29 +00:00
import closure_7 from "setIndex" /* 5479 */;
import closure_8 from "markAllUserIdListsStale" /* 4130 */;
2026-08-31 15:47:37 +00:00
import closure_9 from "mergeGuildAvatar" /* 1922 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-09-01 10:26:29 +00:00
import createCacheKey from "createCacheKey" /* 4478 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
({ ChannelTypes: c10, NotificationSettingsSections: unpackModuleId } = ME);
({ jsx: closure_12, jsxs: map1 } = jsxProd);
let obj = { container: null, searchContainer: null };
2026-08-24 06:08:38 +00:00
obj = { marginHorizontal: ThemesDefault.space.PX_8, flex: 1 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
createCacheKey = { paddingVertical: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
obj[1] = createCacheKey;
let closure_14 = createCacheKey.createStyles(obj);
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function NotificationSettingChannelOverrides(arg0) {
2026-07-23 10:11:24 +00:00
({ guildId: require, navigation } = arg0);
2026-07-29 08:29:29 +00:00
let stateFromStores;
let first;
let channels;
2026-07-23 10:11:24 +00:00
let tmp = callback2();
let obj = require(stateFromStores[11]);
2026-08-24 06:08:38 +00:00
const items = [closure_7];
stateFromStores = obj.useStateFromStores(items, () => closure_1_7.getCategories(closure_0));
2026-07-29 08:29:29 +00:00
const tmp6 = first(channels.useState(""), 2);
first = tmp6[0];
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, first];
2026-07-23 10:11:24 +00:00
const memo = channels.useMemo(() => {
2026-08-24 06:08:38 +00:00
channels = navigation(stateFromStores[13])(stateFromStores._categories, stateFromStores, (channel) => {
2026-07-20 16:05:17 +00:00
channel = channel.channel;
2026-08-24 06:08:38 +00:00
let tmp = closure_1_6(channel.type);
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-08-24 06:08:38 +00:00
let tmp3 = channel.type === closure_1_10.GUILD_CATEGORY;
2026-07-20 16:05:17 +00:00
if (tmp3) {
2026-07-29 08:29:29 +00:00
tmp3 = null != dependencyMap[channel.id];
2026-07-20 16:05:17 +00:00
}
if (tmp3) {
2026-07-29 08:29:29 +00:00
tmp3 = dependencyMap[channel.id].length > 0;
2026-07-20 16:05:17 +00:00
}
tmp = tmp3;
}
if (tmp) {
2026-08-24 06:08:38 +00:00
if ("" !== closure_3) {
2026-07-29 08:29:29 +00:00
if (null != str) {
2026-08-24 06:08:38 +00:00
const obj = closure_1_0(closure_1_2[14]);
const formatted = closure_1_0(closure_1_2[14]).computeChannelName(channel, closure_1_9, closure_1_8).toLowerCase();
const str3 = closure_1_0(closure_1_2[14]).computeChannelName(channel, closure_1_9, closure_1_8);
return closure_1_1(closure_1_2[15])(str.toLowerCase(), formatted);
2026-07-20 16:05:17 +00:00
}
}
return tmp;
} else {
return false;
}
}).map((channel) => channel.channel);
const sections = [channels.length];
return { channels, sections };
}, items1);
2026-07-23 10:11:24 +00:00
channels = memo.channels;
2026-07-20 16:05:17 +00:00
const items2 = [channels, first];
2026-07-23 10:11:24 +00:00
const effect = channels.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (null != first) {
2026-07-29 08:29:29 +00:00
if ("" !== tmp) {
2026-07-20 16:05:17 +00:00
if (channels.length > 0) {
2026-08-24 06:08:38 +00:00
const intl2 = closure_1_0(stateFromStores[16]).intl;
2026-07-29 08:29:29 +00:00
const obj = { count: null };
obj[0] = length;
2026-08-24 06:08:38 +00:00
let formatToPlainStringResult = intl2.formatToPlainString(closure_1_0(stateFromStores[16]).t.ZGVL3g, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
const intl = closure_1_0(stateFromStores[16]).intl;
formatToPlainStringResult = intl.string(closure_1_0(stateFromStores[16]).t.f5cMAg);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const AccessibilityAnnouncer = closure_1_0(stateFromStores[17]).AccessibilityAnnouncer;
2026-07-20 16:05:17 +00:00
AccessibilityAnnouncer.announce(formatToPlainStringResult);
}
}
}, items2);
const items3 = [channels, navigation];
2026-07-23 10:11:24 +00:00
const callback = channels.useCallback((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
closure_0 = tmp;
2026-07-29 08:29:29 +00:00
let obj = { icon: null, start: null, end: null, label: null, labelLineClamp: 1, arrow: true, onPress: null };
2026-08-24 06:08:38 +00:00
obj = { IconComponent: closure_1_0(stateFromStores[21]).getChannelIconComponent(channels[arg1]) };
obj[0] = closure_1_12(closure_1_0(stateFromStores[20]).TableRowIcon, obj);
2026-07-29 08:29:29 +00:00
obj[1] = 0 === arg1;
obj[2] = arg1 === channels.length - 1;
2026-08-24 06:08:38 +00:00
const obj3 = closure_1_0(stateFromStores[21]);
obj[3] = closure_1_0(stateFromStores[14]).computeChannelName(channels[arg1], closure_1_9, closure_1_8);
2026-07-29 08:29:29 +00:00
obj[6] = function onPress() {
2026-08-24 06:08:38 +00:00
closure_1_1.push(closure_2_11.CHANNEL_OVERRIDE, { channelId: id.id });
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
return closure_1_12(closure_1_0(stateFromStores[19]).TableRow, obj);
2026-07-20 16:05:17 +00:00
}, items3);
2026-07-29 08:29:29 +00:00
obj = { style: tmp.container, children: null };
obj = { style: tmp.searchContainer, children: null };
const tmp10 = navigation(stateFromStores[18])();
const tmp5 = navigation;
2026-08-24 06:08:38 +00:00
obj1 = { placeholder: null, onChange: null };
2026-07-23 10:11:24 +00:00
let intl = require(stateFromStores[16]).intl;
2026-07-29 08:29:29 +00:00
obj1[0] = intl.string(require(stateFromStores[16]).t["5h0QOP"]);
obj1[1] = tmp6[1];
obj[1] = callback(require(stateFromStores[23]).SearchField, obj1);
2026-07-23 10:11:24 +00:00
const items4 = [callback(View, obj), ];
2026-07-20 16:05:17 +00:00
if (0 === channels.length) {
2026-07-29 08:29:29 +00:00
const obj2 = { Illustration: null, title: null, body: null };
obj2[0] = tmp2(tmp3[25]).NoResults;
let intl2 = tmp2(tmp3[16]).intl;
obj2[1] = intl2.string(tmp2(tmp3[16]).t.wM7uRI);
const intl3 = tmp2(tmp3[16]).intl;
obj2[2] = intl3.string(tmp2(tmp3[16]).t.f5cMAg);
let tmp15Result = tmp15(tmp2(tmp3[24]).EmptyState, obj2);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let obj3 = { sections: null, renderItem: null, itemSize: null, insetEnd: null, estimatedListSize: "windowSize", placeholderConfig: null, wrapChildren: true };
obj3[0] = memo.sections;
obj3[1] = callback;
obj3[2] = tmp10;
obj3[3] = navigation(stateFromStores[12])().insets.bottom;
obj3[5] = tmp12;
tmp15Result = tmp15(tmp5(tmp3[26]), obj3);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items4[1] = tmp15Result;
obj[1] = items4;
2026-07-20 16:05:17 +00:00
return closure_13(View, obj);
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/notification_settings/native/NotificationSettingChannelOverrides.native.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;