Files
discord-decomp/sources/modules/rtc/native/SecureFramesVerificationBottomSheet.tsx
T
2026-07-27 16:20:00 +03:00

87 lines
6.2 KiB
TypeScript

/* Metro module 9290; source: modules/rtc/native/SecureFramesVerificationBottomSheet.tsx; dependencies: [31, 27, 9277, 33, 4501, 697, 9282, 4080, 6275, 6758, 6806, 5278, 1244, 4573, 4572, 6705, 9288, 9291, 2] */
function _fun72658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9476:6, offset: 0x01d4d1ea, size: 367 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(9277) /* metro dependency 9277: SecureFramesConstants */;
const env0_5 = value.EPOCH_AUTHENTICATOR_CHUNK_SIZE;
const env0_6 = value.EPOCH_AUTHENTICATOR_COLUMNS;
const env0_7 = value.EPOCH_AUTHENTICATOR_LENGTH;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
const env0_10 = Reflect.apply(createStyles, value, [{iconContainer: {'height': 80, 'width': 80, 'borderRadius': 40,
'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_MOD_STRONG},
icon: {'height': 48, 'width': 48}, share: {height: 24}, content: {padding: 16}, subtitle: {textAlign: 'center'},
footer: {'textAlign': 'center', 'marginTop': 8}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rtc/native/SecureFramesVerificationBottomSheet.tsx');
exports.default = SecureFramesVerificationBottomSheet;
}
function SecureFramesVerificationBottomSheet({title, subtitle, footer, epochAuthenticator, onShareClick}) { // fn#72659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9476:668, offset: 0x01d4d359, size: 961 bytes, params: 2, frame: 34
var object4;
const styles = useStyles();
const value2 = (require(9282) /* metro dependency 9282: useReadableSecureFramesFingerprint */).useReadableSecureFramesFingerprint({fingerprintBase64: epochAuthenticator,
chunkSize: EPOCH_AUTHENTICATOR_CHUNK_SIZE, desiredLength: EPOCH_AUTHENTICATOR_LENGTH});
const binding = env0_3;
const value3 = binding.useCallback(_fun72660, [value2, onShareClick]);
const value4 = binding.useCallback(_fun72661, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {startExpanded: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object3 = {title: null};
const ActionSheetCloseButton = (require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton;
object3.leading = <ActionSheetCloseButton onPress={value4} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.share, hitSlop: 8, onPress: value3, disabled: value2 == null,
accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
pressableOpacityProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
object3.trailing = <PressableOpacity {...pressableOpacityProps}><Text variant="text-md/semibold" color="text-brand">{Reflect.apply(string,
intl, [RDE0Sc])}</Text></PressableOpacity>;
object4.header = <BottomSheetTitleHeader {...object3} />;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
const items3 = [<View style={styles.iconContainer}><LockIcon style={styles.icon} color={TEXT_SUBTLE} /></View>];
items3[1] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary">{title}</Text>;
items3[2] = <Text style={styles.subtitle} variant="text-md/medium" color="text-default">{subtitle}</Text>;
const items2 = [<Stack spacing={8} justify="center" align="center" direction="vertical">{items3}</Stack>];
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cgBTyO)} trailing={value2 != null && ((Component) => <Component chunks={value2} />)(importDefault(9291) /* metro dependency 9291: SecureFramesCopyIcon */)} chunks={value2} columns={EPOCH_AUTHENTICATOR_COLUMNS} />)(importDefault(9288) /* metro dependency 9288: SecureFramesCode */);
items2[2] = <Text style={styles.footer} variant="text-xs/normal" color="text-muted">{footer}</Text>;
return (
<BottomSheet {...object4}>
<View style={styles.content}>
{items2}
</View>
</BottomSheet>
);
}
function _fun72660() { // fn#72660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9476:903, offset: 0x01d4d71a, size: 81 bytes, params: 1, frame: 13
var value2;
var value3;
if (env0_1 != null) {
value2 = env0_1.join(' ');
value3 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
onShareClick(value2);
}
}
function _fun72661() { // fn#72661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9476:996, offset: 0x01d4d76b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}