127 lines
6.4 KiB
TypeScript
127 lines
6.4 KiB
TypeScript
/* Metro module 4562; source: design/components/Backdrop/native/Backdrop.native.tsx; dependencies: [31, 27, 33, 4501, 697, 1244, 3868, 1585, 4000, 4017, 4563, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseSafeAreaInsetsNative from '../../../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
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 NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
|
|
function _fun38785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4740:6, offset: 0x010ca32e, size: 315 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const getBlurAmount = function(a0) {
|
|
if (a0 === 'none') {
|
|
return 0;
|
|
}
|
|
if (a0 === 'subtle') {
|
|
return 0.05;
|
|
}
|
|
if (a0 === 'strong') {
|
|
return 0.25;
|
|
}
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_4 = value.Pressable;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
const env0_7 = {};
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.fill = StyleSheet.absoluteFillObject;
|
|
const BACKGROUND_SCRIM = (Native).colors.BACKGROUND_SCRIM;
|
|
object.backdrop = {backgroundColor: BACKGROUND_SCRIM};
|
|
const MOBILE_BACKGROUND_SCRIM_OPAQUE = (Native).colors.MOBILE_BACKGROUND_SCRIM_OPAQUE;
|
|
object.backdropOpaque = {backgroundColor: MOBILE_BACKGROUND_SCRIM_OPAQUE};
|
|
object.accessibilityDismiss = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': 16};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/Backdrop/native/Backdrop.native.tsx');
|
|
exports.Backdrop = Backdrop;
|
|
function Backdrop(a0) { // fn#38787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4740:643, offset: 0x010ca4a6, size: 636 bytes, params: 2, frame: 31
|
|
var r11;
|
|
var r5;
|
|
var intl;
|
|
var object;
|
|
var object4;
|
|
var VisualEffectViewAnimated;
|
|
const style = a0.style;
|
|
const accessibleDismissStyle = a0.accessibleDismissStyle;
|
|
const animatedProps = a0.animatedProps;
|
|
const r4 = animatedProps !== undefined ? animatedProps : env0_7;
|
|
let opaque = a0.opaque;
|
|
opaque = !(opaque === undefined) && opaque;
|
|
let blur = a0.blur;
|
|
blur = blur === undefined ? 'none' : blur;
|
|
const onDismiss = a0.onDismiss;
|
|
const accessibilityLabel = a0.accessibilityLabel;
|
|
if (accessibilityLabel !== undefined) {
|
|
r11 = accessibilityLabel;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r11 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu);
|
|
}
|
|
const property = a0['aria-hidden'];
|
|
const styles = useStyles();
|
|
const useThemeContext = NativeModule.useThemeContext;
|
|
const theme = Reflect.apply(useThemeContext, NativeModule, []).theme;
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const backgroundColor = styles.backdrop.backgroundColor;
|
|
const useMemo = ReactModule.useMemo;
|
|
const items2 = [backgroundColor];
|
|
const value2 = Reflect.apply(useMemo, ReactModule, [_fun38788, items2]);
|
|
({onPress: onDismiss})['aria-hidden'] = true;
|
|
const View = (ReanimatedRexport).View;
|
|
let fill = styles.fill;
|
|
const items4 = [fill, style];
|
|
const items3 = [
|
|
onDismiss != null && <Pressable style={[styles.accessibilityDismiss, {top: top},
|
|
accessibleDismissStyle]} onPress={onDismiss} accessibilityRole="button" accessibilityLabel={r11} {...{['aria-hidden']: property}} />,
|
|
|
|
];
|
|
if (blur !== 'none') {
|
|
object4 = {};
|
|
copyDataProperties(object4, items2, top);
|
|
fill = styles.fill;
|
|
object4['style'] = fill;
|
|
VisualEffectViewAnimated = importDefault(4563) /* metro dependency 4563: VisualEffectViewAnimated */;
|
|
var defaultImportProps = {blurAmount: getBlurAmount(blur)};
|
|
fill = styles.fill;
|
|
defaultImportProps.style = fill;
|
|
defaultImportProps.blurTheme = theme;
|
|
defaultImportProps.blurTintRgba = value2;
|
|
defaultImportProps.android_fallbackColor = styles.backdrop.backgroundColor;
|
|
object4['children'] = <VisualEffectViewAnimated {...defaultImportProps} />;
|
|
r5 = object4;
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object, items2, top);
|
|
object['style'] = [styles.fill, opaque ? styles.backdropOpaque : styles.backdrop];
|
|
r5 = object;
|
|
}
|
|
items3[1] = <Pressable {...r5} />;
|
|
return (
|
|
<View
|
|
style={items4}
|
|
pointerEvents="box-none"
|
|
animatedProps={r4}
|
|
>
|
|
{items3}
|
|
</View>
|
|
);
|
|
function _fun38788() { // fn#38788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4740:930, offset: 0x010ca722, size: 45 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
|
return value.hexToRgbaString(backgroundColor);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun38785, 4562, [31, 27, 33, 4501, 697, 1244, 3868, 1585, 4000, 4017, 4563,
|
|
2]) /* metro module 4562, dependencies: [31, 27, 33, 4501, 697, 1244, 3868, 1585, 4000, 4017, 4563, 2] */;
|