decord/source/modules/oauth2/native/Header.tsx

87 lines
4 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 10590
// Function ID: 10591
2026-07-20 16:05:17 +00:00
// Name: Header
2026-08-12 06:57:52 +00:00
// Dependencies: [19, 17, 676, 21, 4344, 712, 1435, 1297, 4340, 9177, 1403, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 10590 (Header)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { UserFlags } from "ME";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { header: null, applicationNameWrapper: null, headerIcons: null, ellipseGroup: null, ellipse: null, botTag: null };
createCacheKey = { paddingBottom: 16, marginHorizontal: 16, borderTopLeftRadius: require("Themes").radii.sm, borderTopRightRadius: require("Themes").radii.sm, flexDirection: "column", justifyContent: "center", alignItems: "center" };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flexDirection: "row" };
createCacheKey[2] = { alignItems: "center", flexDirection: "row", justifyContent: "space-between", marginBottom: 24 };
createCacheKey[3] = { flexDirection: "row", justifyContent: "space-between", marginHorizontal: 24 };
createCacheKey[4] = { width: 4, height: 4, marginHorizontal: 2, backgroundColor: require("Themes").colors.MOBILE_TEXT_HEADING_PRIMARY, opacity: 0.1, borderRadius: 2 };
createCacheKey[5] = { marginTop: 4, marginLeft: 8 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj1 = { width: 4, height: 4, marginHorizontal: 2, backgroundColor: require("Themes").colors.MOBILE_TEXT_HEADING_PRIMARY, opacity: 0.1, borderRadius: 2 };
2026-07-23 10:11:24 +00:00
const result = require("ME").fileFinishedImporting("modules/oauth2/native/Header.tsx");
2026-07-20 16:05:17 +00:00
export default function Header(accountScopes) {
let application;
let bot;
let user;
({ user, application, bot } = accountScopes);
2026-07-29 08:29:29 +00:00
const tmp = createCacheKey();
2026-08-11 06:20:06 +00:00
let obj = importDefault(1435);
2026-07-20 16:05:17 +00:00
obj = { id: application.id, icon: application.icon };
let userAvatarSource;
const applicationIconSource = obj.getApplicationIconSource(obj);
if (null != user) {
2026-08-11 06:20:06 +00:00
let tmp2Result = tmp2(1435);
2026-07-29 08:29:29 +00:00
userAvatarSource = tmp2Result.getUserAvatarSource(user);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: tmp.header, children: null };
const obj1 = { style: tmp.headerIcons, children: null };
const obj2 = { source: applicationIconSource, size: null };
obj2[1] = require(1297) /* Button */.AvatarSizes.XLARGE;
const items = [callback(require(1297) /* Button */.Avatar, obj2), , ];
const obj3 = { style: tmp.ellipseGroup, children: null };
2026-07-20 16:05:17 +00:00
const items1 = [callback(View, { style: tmp.ellipse }), callback(View, { style: tmp.ellipse }), callback(View, { style: tmp.ellipse })];
2026-07-29 08:29:29 +00:00
obj3[1] = items1;
2026-07-20 16:05:17 +00:00
items[1] = callback2(View, obj3);
2026-07-29 08:29:29 +00:00
const obj7 = { source: userAvatarSource, size: null };
obj7[1] = require(1297) /* Button */.AvatarSizes.XLARGE;
items[2] = callback(require(1297) /* Button */.Avatar, obj7);
obj1[1] = items;
2026-07-20 16:05:17 +00:00
const items2 = [callback2(View, obj1), , ];
2026-07-29 08:29:29 +00:00
const obj8 = { style: tmp.applicationNameWrapper, children: null };
2026-08-12 06:57:52 +00:00
const items3 = [callback(require(4340) /* Text */.Text, { variant: "text-lg/bold", color: "mobile-text-heading-primary", children: application.name }), ];
2026-07-29 08:29:29 +00:00
let tmp8Result = null;
2026-07-20 16:05:17 +00:00
if (null != bot) {
2026-07-29 08:29:29 +00:00
const obj10 = { style: null, verified: null };
obj10[0] = tmp.botTag;
2026-07-20 16:05:17 +00:00
let hasFlagResult = null != bot.public_flags;
2026-08-12 06:57:52 +00:00
tmp2Result = tmp2(9177);
2026-07-20 16:05:17 +00:00
if (hasFlagResult) {
2026-08-11 06:20:06 +00:00
hasFlagResult = tmp9(1403).hasFlag(bot.public_flags, UserFlags.VERIFIED_BOT);
const tmp9Result = tmp9(1403);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj10[1] = hasFlagResult;
tmp8Result = tmp8(tmp2Result, obj10);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[1] = tmp8Result;
obj8[1] = items3;
2026-07-20 16:05:17 +00:00
items2[1] = callback2(View, obj8);
if (accountScopes.accountScopes.length > 0) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp9(1236).intl;
let stringResult = intl2.string(tmp9(1236).t.jFbDnJ);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp9(1236).intl;
stringResult = intl.string(tmp9(1236).t["X+Fdpo"]);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items2[2] = callback(require(4340) /* Text */.Text, { variant: "heading-md/normal", color: "text-default", children: stringResult });
2026-07-29 08:29:29 +00:00
obj[1] = items2;
2026-07-20 16:05:17 +00:00
return callback2(View, obj);
};