79 lines
4.8 KiB
TypeScript
79 lines
4.8 KiB
TypeScript
/* Metro module 9413; source: modules/oauth2/native/Header.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244, 2] */
|
|
function _fun73329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9599:6, offset: 0x01d6894f, size: 408 bytes, params: 8, frame: 22
|
|
var object3;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserFlags;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object3 = {};
|
|
const object4 = {'paddingBottom': 16, 'marginHorizontal': 16, 'borderTopLeftRadius': null,
|
|
'borderTopRightRadius': null, 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object3.header = object4;
|
|
object3.applicationNameWrapper = {flexDirection: 'row'};
|
|
object3.headerIcons = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
|
'marginBottom': 24};
|
|
object3.ellipseGroup = {'flexDirection': 'row', 'justifyContent': 'space-between', 'marginHorizontal': 24};
|
|
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
|
object3.ellipse = {'width': 4, 'height': 4, 'marginHorizontal': 2, 'backgroundColor': null, 'opacity': 0.1,
|
|
'borderRadius': 2, backgroundColor: MOBILE_TEXT_HEADING_PRIMARY};
|
|
object3.botTag = {'marginTop': 4, 'marginLeft': 8};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/Header.tsx');
|
|
exports.default = Header_73330;
|
|
}
|
|
|
|
function Header_73330({user, application, accountScopes, bot}) { // fn#73330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9599:854, offset: 0x01d68ae7, size: 798 bytes, params: 2, frame: 30
|
|
var r14;
|
|
var r7;
|
|
var BotTag;
|
|
var value10;
|
|
var moduleValue;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const styles = useStyles();
|
|
const applicationIconSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: application.id,
|
|
icon: application.icon});
|
|
const r18 = user != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(user) : undefined;
|
|
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
|
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
|
let XLARGE = AvatarSizes.XLARGE;
|
|
const items2 = [<Avatar source={applicationIconSource} size={XLARGE} />];
|
|
items2[1] = <View style={styles.ellipseGroup}><View style={styles.ellipse} /><View style={styles.ellipse} /><View style={styles.ellipse} /></View>;
|
|
XLARGE = AvatarSizes.XLARGE;
|
|
items2[2] = <Avatar source={r18} size={XLARGE} />;
|
|
const items3 = [<View style={styles.headerIcons}>{items2}</View>];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const text = <Text variant="text-lg/bold" color="mobile-text-heading-primary">{application.name}</Text>;
|
|
if (bot != null) {
|
|
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
|
|
var defaultImport3Props = {style: styles.botTag};
|
|
value10 = bot.public_flags != null;
|
|
if (value10) {
|
|
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
|
r14 = moduleValue.hasFlag(bot.public_flags, UserFlags.VERIFIED_BOT);
|
|
} else {
|
|
r14 = value10;
|
|
}
|
|
defaultImport3Props.verified = r14;
|
|
r7 = <BotTag {...defaultImport3Props} />;
|
|
} else {
|
|
r7 = null;
|
|
}
|
|
items3[1] = <View style={styles.applicationNameWrapper}>{text}{r7}</View>;
|
|
items3[2] = <Text variant="heading-md/normal" color="text-default">{accountScopes.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jFbDnJ) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['X+Fdpo'])}</Text>;
|
|
return (
|
|
<View style={styles.header}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
|