150 lines
8.5 KiB
TypeScript
150 lines
8.5 KiB
TypeScript
/* Metro module 15212; source: modules/integration_settings/native/IntegrationsSettingsEditLinkedLobby.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 3860, 1484, 6771, 6789, 6777, 4805, 566, 12134, 8743, 1244, 4573, 7972, 4572, 1305, 1423, 6231, 6238, 2] */
|
|
function _fun116355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:6, offset: 0x02485f23, size: 321 bytes, params: 8, frame: 22
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.Fragment;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object2.screenContainer = {backgroundColor: BACKGROUND_BASE_LOWER};
|
|
object2.header = {'alignItems': 'center', 'marginTop': 8, 'marginBottom': 32, 'gap': 12};
|
|
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
|
object2.divider = {'height': 1, 'width': 48, backgroundColor: BORDER_STRONG};
|
|
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/integration_settings/native/IntegrationsSettingsEditLinkedLobby.tsx');
|
|
exports.default = EditLinkedLobby;
|
|
}
|
|
|
|
function EditLinkedLobby({channel, numScreensToPop}) { // fn#116356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:525, offset: 0x02486064, size: 1206 bytes, params: 2, frame: 37
|
|
var r0;
|
|
var Form;
|
|
var Stack;
|
|
var object3;
|
|
var Avatar;
|
|
var defaultImport4;
|
|
var items2;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
var items3;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
|
const useToken = useTokenModule.useToken;
|
|
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
|
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
|
|
const styles = useStyles();
|
|
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
|
const EDIT_CHANNEL_SYNCING = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_CHANNEL_SYNCING;
|
|
const analyticsLocations = defaultImport(EDIT_CHANNEL_SYNCING).analyticsLocations;
|
|
const env0_3 = analyticsLocations;
|
|
const value6 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
|
|
const value7 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
|
|
const linked_at = channel.linkedLobby?.linked_at;
|
|
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun116357);
|
|
let binding = env0_3;
|
|
let useCallback = binding.useCallback;
|
|
const value10 = (importDefault(12134) /* metro dependency 12134: useShowUnlinkChannelAlert */)(channel.id,
|
|
value6?.name ?? '', Reflect.apply(useCallback, binding, [_fun116358, [value4, numScreensToPop]]));
|
|
binding = env0_3;
|
|
useCallback = binding.useCallback;
|
|
const value12 = binding.useMemo(_fun116360, [linked_at, user, Reflect.apply(useCallback, binding, [_fun116359,
|
|
[user, analyticsLocations, channel.id]])]);
|
|
if (value6 == null) {
|
|
r0 = null;
|
|
} else {
|
|
Form = (require(7972) /* metro dependency 7972: native */).Form;
|
|
var formProps = {style: styles.screenContainer, contentContainerStyle: {paddingTop: 16}};
|
|
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24,
|
|
style: {paddingHorizontal: value3}};
|
|
var viewBindingProps = {style: styles.header};
|
|
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
|
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
items2 = [<Avatar source={defaultImport4.getApplicationIconSource({id: value6.id,
|
|
icon: value6.icon})} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XXLARGE} />];
|
|
items2[1] = <Text variant="text-md/medium" color="mobile-text-heading-primary">{value6.name}</Text>;
|
|
items2[2] = value12 != null && <><View style={styles.divider} /><Text variant="text-sm/medium" color="text-subtle">{value12}</Text></>;
|
|
items3 = [<View {...viewBindingProps}>{items2}</View>];
|
|
items3[1] = <Text variant="text-sm/normal" color="text-default">{intl.format(t.DA9v5F,
|
|
{channelName: value7})}</Text>;
|
|
items3[2] = ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={intl.string(t.LLWaxQ)} variant="danger" onPress={value10} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
|
|
r0 = <Form {...formProps}><Stack {...stackProps}>{items3}</Stack></Form>;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun116357() { // fn#116357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:925, offset: 0x0248651a, size: 50 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
return UserStore.getUser(channel.linkedLobby?.linked_by);
|
|
}
|
|
|
|
function _fun116358() { // fn#116358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:1017, offset: 0x0248654c, size: 26 bytes, params: 1, frame: 11
|
|
const binding = env0_2;
|
|
binding.pop(numScreensToPop);
|
|
}
|
|
|
|
function _fun116359() { // fn#116359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:1113, offset: 0x02486566, size: 84 bytes, params: 1, frame: 13
|
|
var value2;
|
|
var defaultImport;
|
|
var object2;
|
|
var id;
|
|
if (user != null) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
|
object2 = {};
|
|
id = user.id;
|
|
object2.userId = id;
|
|
id = channel.id;
|
|
object2.channelId = id;
|
|
object2.sourceAnalyticsLocations = analyticsLocations;
|
|
defaultImport(object2);
|
|
}
|
|
}
|
|
|
|
function _fun116360() { // fn#116360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:1220, offset: 0x024865ba, size: 231 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var r1;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var value4;
|
|
var value;
|
|
if (linked_at == null) {
|
|
return null;
|
|
}
|
|
const Date = global.Date;
|
|
const date = new Date(linked_at);
|
|
if (user != null) {
|
|
value4 = environment.__proto__;
|
|
r1 = intl.format(t.uV2AkA, {username: user.username, usernameHook: usernameHook_116361, linkedAtDate: date});
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = intl.formatToPlainString(t.EyygeM, {linkedAtDate: date});
|
|
r1 = value;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function usernameHook_116361(a0, a1) { // fn#116361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15409:1354, offset: 0x024866a1, size: 80 bytes, params: 3, frame: 15
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text
|
|
onPress={env1_6}
|
|
variant="text-sm/semibold"
|
|
color="text-strong"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|