127 lines
6.4 KiB
TypeScript
127 lines
6.4 KiB
TypeScript
/* Metro module 14544; source: modules/guild_sidebar/native/VoiceUserNameItem.tsx; dependencies: [57, 31, 27, 33, 4501, 4635, 8699, 4573, 3995, 1244, 14545, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import UseDisplayNameStyles from '../../display_name_styles/hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as UseDisplayNameStylesFontModule from '../../display_name_styles/native/useDisplayNameStylesFont.tsx'; /* Metro dependency 8699 */
|
|
|
|
function _fun110027(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14741:6, offset: 0x02366c5e, size: 263 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_8 = (CreateStylesModule).createStyles({container: {'marginLeft': 8,
|
|
'flex': 1, 'flexDirection': 'row'}, tag: {'flexDirection': 'row', 'alignItems': 'center', 'paddingLeft': 8},
|
|
measuringTag: {opacity: 0}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_sidebar/native/VoiceUserNameItem.tsx');
|
|
exports.default = VoiceUserNameItem;
|
|
function VoiceUserNameItem({member, user, guildId, isGuest, color, variant}) { // fn#110028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14741:416, offset: 0x02366d65, size: 759 bytes, params: 2, frame: 35
|
|
var r6;
|
|
var r17;
|
|
var r5;
|
|
var Text2;
|
|
var intl;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value4 = (UseDisplayNameStylesFontModule).useDisplayNameStylesFont({displayNameStyles: (UseDisplayNameStyles)({userId: user.id,
|
|
guildId: guildId})});
|
|
let useState = ReactModule.useState;
|
|
const value5 = Reflect.apply(useState, ReactModule, [0]);
|
|
const binding2 = env0_3;
|
|
const value6 = binding2(value5, 2);
|
|
const property = value6[0];
|
|
const env0_0 = value6[1];
|
|
useState = ReactModule.useState;
|
|
const value7 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
|
|
const property2 = value7[0];
|
|
const env0_1 = value7[1];
|
|
useState = ReactModule.useState;
|
|
const value8 = binding2(Reflect.apply(useState, ReactModule, [true]), 2);
|
|
const property3 = value8[0];
|
|
const env0_2 = value8[1];
|
|
useState = ReactModule.useState;
|
|
const value9 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
|
|
const property4 = value9[0];
|
|
var env0_3 = value9[1];
|
|
const value10 = ReactModule.useCallback(_fun110029, []);
|
|
const value11 = ReactModule.useCallback(_fun110030, []);
|
|
const value12 = ReactModule.useCallback(_fun110031, []);
|
|
const items2 = [styles.container];
|
|
items2[1] = property3 && styles.measuringTag;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const value13 = value4 != null;
|
|
const r19 = member?.nick ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
|
if (isGuest) {
|
|
Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r17 = (
|
|
<Text2
|
|
variant="text-sm/normal"
|
|
lineClamp={1}
|
|
color="status-positive"
|
|
>
|
|
{'\xa0'}
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pFO/Ph'])}
|
|
</Text2>
|
|
);
|
|
} else {
|
|
r17 = isGuest;
|
|
}
|
|
const text = (
|
|
<Text
|
|
variant={variant}
|
|
color={color}
|
|
lineClamp={1}
|
|
onLayout={value11}
|
|
style={value13 && ({fontFamily: value4})}
|
|
>
|
|
{r19}
|
|
{r17}
|
|
</Text>
|
|
);
|
|
if (property3) {
|
|
r5 = property3;
|
|
} else {
|
|
r6 = property !== 0 && property2 !== 0;
|
|
r6 = r6 && property4 !== 0;
|
|
r6 = r6 && property >= property2 + property4;
|
|
r5 = r6;
|
|
}
|
|
if (r5) {
|
|
var viewBinding2Props = {onLayout: value12, style: styles.tag};
|
|
value = importDefault(14545) /* metro dependency 14545: VoiceGuildTag */;
|
|
value = (
|
|
<View {...viewBinding2Props}>
|
|
{((Component) => <Component userId={user.id} />)(value)}
|
|
</View>
|
|
);
|
|
r5 = value;
|
|
}
|
|
return (
|
|
<View onLayout={value10} style={items2}>
|
|
{text}
|
|
{r5}
|
|
</View>
|
|
);
|
|
function _fun110029({nativeEvent}) { // fn#110029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14741:779, offset: 0x01e36d9f, size: 36 bytes, params: 2, frame: 11
|
|
env0_0(nativeEvent.layout.width);
|
|
}
|
|
|
|
function _fun110030({nativeEvent}) { // fn#110030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14741:836, offset: 0x0236705c, size: 36 bytes, params: 2, frame: 11
|
|
env0_1(nativeEvent.layout.width);
|
|
}
|
|
|
|
function _fun110031({nativeEvent}) { // fn#110031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14741:893, offset: 0x02367080, size: 47 bytes, params: 2, frame: 12
|
|
env0_3(nativeEvent.layout.width);
|
|
env0_2(false);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110027, 14544, [57, 31, 27, 33, 4501, 4635, 8699, 4573, 3995, 1244, 14545,
|
|
2]) /* metro module 14544, dependencies: [57, 31, 27, 33, 4501, 4635, 8699, 4573, 3995, 1244, 14545, 2] */;
|