95 lines
4.8 KiB
TypeScript
95 lines
4.8 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] */
|
|
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_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
|
const value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsxs;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'marginLeft': 8,
|
|
'flex': 1, 'flexDirection': 'row'}, tag: {'flexDirection': 'row', 'alignItems': 'center', 'paddingLeft': 8},
|
|
measuringTag: {opacity: 0}});
|
|
(require(2) /* metro dependency 2 */).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 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: user.id,
|
|
guildId: guildId})});
|
|
const binding = env0_4;
|
|
let useState = binding.useState;
|
|
const value5 = Reflect.apply(useState, binding, [0]);
|
|
const binding2 = env0_3;
|
|
const value6 = binding2(value5, 2);
|
|
const property = value6[0];
|
|
const env0_0 = value6[1];
|
|
useState = binding.useState;
|
|
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
|
const property2 = value7[0];
|
|
const env0_1 = value7[1];
|
|
useState = binding.useState;
|
|
const value8 = binding2(Reflect.apply(useState, binding, [true]), 2);
|
|
const property3 = value8[0];
|
|
const env0_2 = value8[1];
|
|
useState = binding.useState;
|
|
const value9 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
|
const property4 = value9[0];
|
|
var env0_3 = value9[1];
|
|
const value10 = binding.useCallback(_fun110029, []);
|
|
const value11 = binding.useCallback(_fun110030, []);
|
|
const value12 = binding.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 _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);
|
|
}
|
|
|