decord/source/modules/guild_sidebar/native/GuildMFAWarning.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

113 lines
4.2 KiB
TypeScript

// Module ID: 16294
// Function ID: 16295
// Name: GuildMFAWarning
// Dependencies: [5, 19, 17, 1074, 21, 4636, 576, 10247, 2024, 1896, 4331, 5204, 16295, 4632, 1114, 1178, 2]
// Exports: default, getScaledGuildMFAWarningHeight
// Module 16294 (GuildMFAWarning)
import nativeDefault from "native" /* 576 */;
import util from "util" /* 1114 */;
import native from "native" /* 1178 */;
import Text_Text from "Text/Text" /* 4632 */;
import Pressables from "Pressables" /* 5204 */;
import useScaledTextLineHeight from "useScaledTextLineHeight" /* 10247 */;
import _modDef16295 from "module_16295" /* 16295 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import noop from "module_19" /* 19 */;
require = fn;
function handlePress() {
const self = this;
const apply = closure_10.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let closure_10 = async function _handlePress(arg0, value) {
if (c3 === 2) {
c3 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c3 = 2;
if (0 === c2) {
if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 3;
const obj3 = { value, done: true };
return obj3;
} else {
closure_1 = tmp5;
closure_0 = tmp2;
closure_128_0 = undefined;
c2 = 1;
c3 = 1;
const obj4 = { value: require("asyncRequireImpl")(paths[8], paths.paths), done: false };
return obj4;
}
} else if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 3;
const obj5 = { value, done: true };
return obj5;
} else {
closure_128_0 = value.default;
closure_129_1(closure_129_2[10]).openURL(closure_128_0.getArticleURL(closure_129_5.SETTING_UP_TWO_FACTOR));
c3 = 3;
return { value: "HermesInternal", done: null };
}
} catch (tmp17) {
c3 = tmp;
throw tmp17;
}
}
};
const Image = fn(17).Image;
const Constants = fn(1074);
({ HelpdeskArticles: hasOwnProperty, Fonts } = Constants);
const jsxProd = fn(21);
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
const createStyles = fn(4636);
let obj2 = { MFAWarning: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, padding: 10, alignItems: "center" }, MFAWarningIcon: { marginVertical: 10, width: 98, height: 53 }, MFAWarningLink: null };
let obj3 = { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, padding: 10, alignItems: "center" };
obj2.MFAWarningLink = { color: nativeDefault.unsafe_rawColors.BLUE_345, fontFamily: Fonts.PRIMARY_SEMIBOLD };
let closure_8 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_sidebar/native/GuildMFAWarning.tsx");
export default function GuildMFAWarning() {
const tmp = closure_8();
const obj = { accessibilityRole: "button", style: tmp.MFAWarning, onPress: handlePress, children: null };
const items = [timestampProducer(Image, { style: tmp.MFAWarningIcon, source: _modDef16295 }), ];
const obj3 = { variant: "text-xs/medium", color: "text-default", children: null };
const intl = util.intl;
const items1 = [intl.string(util.t.ZIf8Ag), ];
const obj4 = { style: tmp.MFAWarningLink, children: null };
const intl2 = util.intl;
const items2 = [" ", intl2.string(util.t.hvVgAZ)];
obj4.children = items2;
items1[1] = React5(native.LegacyText, obj4);
obj3.children = items1;
items[1] = React5(Text_Text.Text, obj3);
obj.children = items;
return React5(Pressables.PressableOpacity, obj);
};
export const getScaledGuildMFAWarningHeight = function getScaledGuildMFAWarningHeight(fontScale) {
return 83 + 5 * useScaledTextLineHeight.scaleTextLineHeight("text-xs/medium", fontScale) + 10 + 10;
};