59 lines
3.4 KiB
TypeScript
59 lines
3.4 KiB
TypeScript
/* Metro module 13435; source: modules/parent_tools/native/FamilyCenterAvatarPair.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 632, 1305, 2] */
|
|
function _fun102179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13625:6, offset: 0x02230d92, size: 299 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 env0_2 = (require(27) /* metro dependency 27 */).View;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object = {'backgroundColor': null, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row',
|
|
'justifyContent': 'space-between', 'alignItems': 'center', 'padding': 8};
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const env0_6 = Reflect.apply(createStyles, value, [{avatars: object, icon: {'height': 24, 'width': 24,
|
|
'marginHorizontal': 16}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterAvatarPair.tsx');
|
|
exports.default = FamilyCenterAvatarPair;
|
|
}
|
|
|
|
function FamilyCenterAvatarPair({otherUser, iconSrc, iconStyles}) { // fn#102180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13625:520, offset: 0x02230ebd, size: 378 bytes, params: 2, frame: 26
|
|
var r0;
|
|
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
|
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
|
var LARGE_48;
|
|
var avatarDecoration;
|
|
var items2;
|
|
var value;
|
|
const styles = useStyles();
|
|
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
|
function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
if (currentUser === undefined) {
|
|
r0 = null;
|
|
} else if (otherUser === undefined) {
|
|
r0 = null;
|
|
} else {
|
|
var viewBindingProps = {style: styles.avatars};
|
|
LARGE_48 = AvatarSizes.LARGE_48;
|
|
avatarDecoration = currentUser.avatarDecoration;
|
|
value = <Avatar size={LARGE_48} user={currentUser} guildId={undefined} avatarDecoration={avatarDecoration} />;
|
|
items2 = [value];
|
|
items2[1] = ((Icon) => <Icon style={[styles.icon,
|
|
iconStyles]} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} source={iconSrc} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
|
LARGE_48 = AvatarSizes.LARGE_48;
|
|
avatarDecoration = otherUser.avatarDecoration;
|
|
items2[2] = <Avatar size={LARGE_48} user={otherUser} guildId={undefined} avatarDecoration={avatarDecoration} />;
|
|
value = <View {...viewBindingProps}>{items2}</View>;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|