111 lines
5.8 KiB
TypeScript
111 lines
5.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] */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
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
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'paddingBottom': 16, 'marginHorizontal': 16, 'borderTopLeftRadius': null,
|
|
'borderTopRightRadius': null, 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object2.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.header = object2;
|
|
object.applicationNameWrapper = {flexDirection: 'row'};
|
|
object.headerIcons = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
|
'marginBottom': 24};
|
|
object.ellipseGroup = {'flexDirection': 'row', 'justifyContent': 'space-between', 'marginHorizontal': 24};
|
|
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
|
object.ellipse = {'width': 4, 'height': 4, 'marginHorizontal': 2, 'backgroundColor': null, 'opacity': 0.1,
|
|
'borderRadius': 2, backgroundColor: MOBILE_TEXT_HEADING_PRIMARY};
|
|
object.botTag = {'marginTop': 4, 'marginLeft': 8};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).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 = (NativeModule).Avatar;
|
|
const AvatarSizes = (NativeModule).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 = (TextModule).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>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73329, 9413, [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244,
|
|
2]) /* metro module 9413, dependencies: [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244, 2] */;
|