Files
discord-decomp/sources/components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx
T
2026-07-27 16:20:00 +03:00

126 lines
7.4 KiB
TypeScript

/* Metro module 15200; source: components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx; dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */
function _fun116242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:6, offset: 0x024826a4, size: 286 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
exports.default = ConnectedChannelSettingsIntegrationsOverview;
}
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
var r0;
var TableRowGroup;
var object2;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
if (value4 == null) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object2.hasIcons = true;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: value4.name};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
tableRowProps.icon = <Avatar source={value.getApplicationIconSource({id: value4.id,
icon: value4.icon})} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
tableRowProps.arrow = true;
tableRowProps.onPress = onPress_116244;
value = <TableRowGroup {...object2}><TableRow {...tableRowProps} /></TableRowGroup>;
r0 = value;
}
return r0;
}
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
var r11;
var r9;
var r0;
var Form;
var Stack;
var object;
var space;
var TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var object6;
var items2;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const styles = useStyles();
if (channel == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.screenContainer};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.spacing = space.PX_24;
if (canManageWebhooks) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [<TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_116247} />];
items3[1] = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_116248} />;
r11 = <TableRowGroup hasIcons>{items3}</TableRowGroup>;
} else {
r11 = canManageWebhooks;
}
items2 = [r11];
r9 = canUnlinkLobby && channel.linkedLobby != null;
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
items2[1] = r9;
r0 = <Form {...formProps}><Stack {...object}>{items2}</Stack></Form>;
}
return r0;
}
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const push = binding.push;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}