Files
2026-07-28 01:06:53 +03:00

171 lines
9.3 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] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
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});
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object2}]);
(FileImportTrackerModule).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 object;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (UseNavigationNativeModule).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;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object.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 {...object}>
<TableRow {...tableRowProps} />
</TableRowGroup>
);
r0 = value;
}
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 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 object2;
var space;
var TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var object3;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items3;
var object4;
var items2;
const env0_1 = (UseNavigationNativeModule).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;
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.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 {...object2}>
{items2}
</Stack>
</Form>
);
}
return r0;
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]);
}
}
}
global.__d(_fun116242, 15200, [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972,
4572, 15117, 15201,
2]) /* metro module 15200, dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */;