decord/source/modules/guild_sidebar/native/GuildMFAWarning.tsx

134 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 15557
// Function ID: 15558
2026-07-20 16:05:17 +00:00
// Name: handlePress
2026-08-25 06:04:03 +00:00
// Dependencies: [5, 19, 17, 676, 21, 4380, 712, 9598, 1995, 2009, 4094, 4949, 15558, 4376, 1236, 1297, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getScaledGuildMFAWarningHeight
2026-08-25 06:04:03 +00:00
// Module 15557 (handlePress)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Button from "Button" /* 1297 */;
2026-08-25 06:04:03 +00:00
import Text from "Text" /* 4376 */;
import PressableBase from "PressableBase" /* 4949 */;
import map from "map" /* 9598 */;
import registerAssetDefault from "registerAsset" /* 15558 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import { Image } from "get ActivityIndicator" /* 17 */;
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function handlePress() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _handlePress.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
function _handlePress() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback(function*() {
if (c3 === 2) {
c3 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-25 06:04:03 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c3 = 2;
if (0 === paths) {
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
const callback = tmp5;
let articleURL = tmp2;
articleURL = undefined;
paths = 1;
c3 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = closure_1_0(paths[9])(paths[8], paths.paths);
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
const obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
} else {
articleURL = arg1.default;
obj = callback(paths[10]);
obj.openURL(articleURL.getArticleURL(constants.SETTING_UP_TWO_FACTOR));
c3 = 3;
2026-08-25 06:04:03 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} catch (tmp17) {
c3 = tmp;
throw tmp17;
}
}
});
2026-08-24 06:08:38 +00:00
closure_10 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ HelpdeskArticles: c5, Fonts } = ME);
({ jsx: closure_6, jsxs: error } = jsxProd);
createCacheKey = { MFAWarning: null, MFAWarningIcon: null, MFAWarningLink: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, padding: 10, alignItems: "center" };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { marginVertical: 10, width: 98, height: 53 };
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { color: ThemesDefault.unsafe_rawColors.BLUE_345, fontFamily: Fonts.PRIMARY_SEMIBOLD };
let closure_8 = createCacheKey.createStyles(createCacheKey);
let obj1 = { color: ThemesDefault.unsafe_rawColors.BLUE_345, fontFamily: Fonts.PRIMARY_SEMIBOLD };
const result = require("set").fileFinishedImporting("modules/guild_sidebar/native/GuildMFAWarning.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildMFAWarning() {
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
let obj = { accessibilityRole: "button", style: tmp.MFAWarning, onPress: handlePress, children: null };
2026-08-24 06:08:38 +00:00
obj = { style: tmp.MFAWarningIcon, source: registerAssetDefault };
2026-07-20 16:05:17 +00:00
const items = [callback2(Image, obj), ];
2026-07-29 08:29:29 +00:00
obj = { variant: "text-xs/medium", color: "text-default", children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
const items1 = [intl.string(getSystemLocale.t.ZIf8Ag), ];
obj1 = { style: tmp.MFAWarningLink, children: null };
const intl2 = getSystemLocale.intl;
const items2 = [" ", intl2.string(getSystemLocale.t.hvVgAZ)];
2026-07-29 08:29:29 +00:00
obj1[1] = items2;
2026-08-24 06:08:38 +00:00
items1[1] = callback3(Button.LegacyText, obj1);
2026-07-29 08:29:29 +00:00
obj[2] = items1;
2026-08-24 06:08:38 +00:00
items[1] = callback3(Text.Text, obj);
2026-07-29 08:29:29 +00:00
obj[3] = items;
2026-08-24 06:08:38 +00:00
return callback3(PressableBase.PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
};
export const getScaledGuildMFAWarningHeight = function getScaledGuildMFAWarningHeight(fontScale) {
2026-08-24 06:08:38 +00:00
return 83 + 5 * map.scaleTextLineHeight("text-xs/medium", fontScale) + 10 + 10;
2026-07-20 16:05:17 +00:00
};