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

134 lines
5.7 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 16597
// Function ID: 129187
// Dependencies: [57, 31, 27, 1352, 5105, 3802, 1850, 653, 33, 4165, 689, 566, 5193, 5106, 4355, 5080, 1212, 3878, 8803, 5198, 5204, 4628, 8798, 9215, 1273, 8345, 9217, 2]
2026-07-20 16:05:17 +00:00
2026-07-28 08:39:19 +00:00
// Module 16597
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import importAllResult from "result";
import { View } from "set";
import { isGuildReadableType } from "_callSuper";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import closure_9 from "_isNativeReflectConstruct";
import ME from "ME";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_10;
let closure_11;
let closure_12;
let closure_13;
const require = arg1;
({ ChannelTypes: closure_10, NotificationSettingsSections: closure_11 } = ME);
({ jsx: closure_12, jsxs: closure_13 } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { marginHorizontal: require("_createForOfIteratorHelperLoose").space.PX_8, flex: 1 };
2026-07-20 16:05:17 +00:00
obj.container = obj;
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = { paddingVertical: require("_createForOfIteratorHelperLoose").space.PX_16 };
obj.searchContainer = _createForOfIteratorHelperLoose;
let closure_14 = _createForOfIteratorHelperLoose.createStyles(obj);
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function NotificationSettingChannelOverrides(arg0) {
let navigation;
2026-07-23 10:11:24 +00:00
let require;
({ guildId: require, navigation } = arg0);
let tmp = callback2();
let obj = require(stateFromStores[11]);
const items = [_isNativeReflectConstruct];
stateFromStores = obj.useStateFromStores(items, () => outer1_7.getCategories(closure_0));
let tmp3 = first(channels.useState(""), 2);
first = tmp3[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-07-20 16:05:17 +00:00
const channels = navigation(stateFromStores[13])(stateFromStores._categories, stateFromStores, (channel) => {
channel = channel.channel;
2026-07-23 10:11:24 +00:00
let tmp = outer2_6(channel.type);
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-07-23 10:11:24 +00:00
let tmp3 = channel.type === outer2_10.GUILD_CATEGORY;
2026-07-20 16:05:17 +00:00
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = null != outer1_2[channel.id];
2026-07-20 16:05:17 +00:00
}
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1_2[channel.id].length > 0;
2026-07-20 16:05:17 +00:00
}
tmp = tmp3;
}
if (tmp) {
2026-07-23 10:11:24 +00:00
if ("" !== outer1_3) {
if (null != outer1_3) {
const obj = outer2_0(stateFromStores[14]);
const formatted = outer2_0(stateFromStores[14]).computeChannelName(channel, outer2_9, outer2_8).toLowerCase();
const str2 = outer2_0(stateFromStores[14]).computeChannelName(channel, outer2_9, outer2_8);
return navigation(stateFromStores[15])(outer1_3.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) {
if ("" !== first) {
if (channels.length > 0) {
2026-07-23 10:11:24 +00:00
const intl2 = outer1_0(stateFromStores[16]).intl;
2026-07-20 16:05:17 +00:00
const obj = { count: length };
2026-07-23 10:11:24 +00:00
let formatToPlainStringResult = intl2.formatToPlainString(outer1_0(stateFromStores[16]).t.ZGVL3g, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const intl = outer1_0(stateFromStores[16]).intl;
formatToPlainStringResult = intl.string(outer1_0(stateFromStores[16]).t.f5cMAg);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const AccessibilityAnnouncer = outer1_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) => {
let closure_0 = tmp;
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { IconComponent: outer1_0(stateFromStores[21]).getChannelIconComponent(channels[arg1]) };
obj.icon = outer1_12(outer1_0(stateFromStores[20]).TableRowIcon, obj);
2026-07-20 16:05:17 +00:00
obj.start = 0 === arg1;
obj.end = arg1 === channels.length - 1;
2026-07-23 10:11:24 +00:00
const obj3 = outer1_0(stateFromStores[21]);
obj.label = outer1_0(stateFromStores[14]).computeChannelName(channels[arg1], outer1_9, outer1_8);
2026-07-20 16:05:17 +00:00
obj.labelLineClamp = 1;
obj.arrow = true;
obj.onPress = function onPress() {
2026-07-23 10:11:24 +00:00
outer1_1.push(outer2_11.CHANNEL_OVERRIDE, { channelId: tmp.id });
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
return outer1_12(outer1_0(stateFromStores[19]).TableRow, obj);
2026-07-20 16:05:17 +00:00
}, items3);
obj = { style: tmp.container };
obj = { style: tmp.searchContainer };
2026-07-23 10:11:24 +00:00
const tmp7 = navigation(stateFromStores[18])();
2026-07-20 16:05:17 +00:00
const obj1 = {};
2026-07-23 10:11:24 +00:00
let intl = require(stateFromStores[16]).intl;
obj1.placeholder = intl.string(require(stateFromStores[16]).t["5h0QOP"]);
2026-07-20 16:05:17 +00:00
obj1.onChange = tmp3[1];
2026-07-23 10:11:24 +00:00
obj.children = callback(require(stateFromStores[23]).SearchField, obj1);
const items4 = [callback(View, obj), ];
2026-07-20 16:05:17 +00:00
if (0 === channels.length) {
2026-07-23 10:11:24 +00:00
const obj2 = { Illustration: require(stateFromStores[25]).NoResults };
let intl2 = require(stateFromStores[16]).intl;
obj2.title = intl2.string(require(stateFromStores[16]).t.wM7uRI);
const intl3 = require(stateFromStores[16]).intl;
obj2.body = intl3.string(require(stateFromStores[16]).t.f5cMAg);
let tmp15 = callback(require(stateFromStores[24]).EmptyState, obj2);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj3 = { sections: memo.sections, renderItem: callback, itemSize: tmp7, insetEnd: navigation(stateFromStores[12])().insets.bottom, estimatedListSize: "windowSize", placeholderConfig: tmp9, wrapChildren: true };
tmp15 = callback(navigation(stateFromStores[26]), obj3);
2026-07-20 16:05:17 +00:00
}
items4[1] = tmp15;
obj.children = items4;
return closure_13(View, obj);
});
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("modules/notification_settings/native/NotificationSettingChannelOverrides.native.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;