decord/source/design/components/Backdrop/native/Backdrop.native.tsx

99 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4728
// Function ID: 4729
2026-07-29 08:29:29 +00:00
// Name: Backdrop
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 712, 1236, 4107, 1629, 4119, 4729, 2]
2026-07-20 16:05:17 +00:00
// Exports: Backdrop
2026-08-24 06:08:38 +00:00
// Module 4728 (Backdrop)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1629 */;
import ManaContext from "ManaContext" /* 4107 */;
import _modDef4119 from "module_4119" /* 4119 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-08-06 08:05:19 +00:00
({ Pressable: c3, StyleSheet } = get_ActivityIndicator);
({ jsx: c4, jsxs: c5 } = jsxProd);
let closure_6 = {};
2026-07-29 08:29:29 +00:00
createCacheKey = { fill: StyleSheet.absoluteFillObject, backdrop: null, backdropOpaque: null, accessibilityDismiss: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_SCRIM };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { backgroundColor: ThemesDefault.colors.MOBILE_BACKGROUND_SCRIM_OPAQUE };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { position: "absolute", top: 0, left: 0, right: 0, height: 16 };
2026-08-24 06:08:38 +00:00
let closure_7 = createCacheKey.createStyles(createCacheKey);
let obj1 = { backgroundColor: ThemesDefault.colors.MOBILE_BACKGROUND_SCRIM_OPAQUE };
const result = require("set").fileFinishedImporting("design/components/Backdrop/native/Backdrop.native.tsx");
2026-07-20 16:05:17 +00:00
export const Backdrop = function Backdrop(animatedProps) {
animatedProps = animatedProps.animatedProps;
({ style, accessibleDismissStyle } = animatedProps);
if (animatedProps === undefined) {
2026-08-06 08:05:19 +00:00
animatedProps = closure_6;
2026-07-20 16:05:17 +00:00
}
let flag = animatedProps.opaque;
if (flag === undefined) {
flag = false;
}
let str = animatedProps.blur;
if (str === undefined) {
str = "none";
}
({ onDismiss, accessibilityLabel } = animatedProps);
if (accessibilityLabel === undefined) {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
accessibilityLabel = intl.string(getSystemLocale.t.WAI6xu);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
let backgroundColor = callback2();
let obj = ManaContext;
2026-07-23 10:11:24 +00:00
obj = { onPress: onDismiss, "aria-hidden": true };
2026-08-06 08:05:19 +00:00
obj = { style: items, pointerEvents: "box-none", animatedProps, children: null };
items = [backgroundColor.fill, style];
let tmp4 = null != onDismiss;
if (tmp4) {
2026-08-24 06:08:38 +00:00
obj1 = { style: null, onPress: null, accessibilityRole: "button", accessibilityLabel: null, "aria-hidden": null };
2026-08-06 08:05:19 +00:00
const items1 = [backgroundColor.accessibilityDismiss, , ];
2026-07-29 08:29:29 +00:00
const obj2 = { top: null };
2026-08-24 06:08:38 +00:00
obj2[0] = useSafeAreaInsetsDefault().top;
2026-08-06 08:05:19 +00:00
items1[1] = obj2;
items1[2] = accessibleDismissStyle;
obj1[0] = items1;
2026-07-29 08:29:29 +00:00
obj1[1] = onDismiss;
obj1[3] = accessibilityLabel;
obj1[4] = animatedProps["aria-hidden"];
2026-08-06 08:05:19 +00:00
tmp4 = callback(closure_3, obj1);
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
const items2 = [tmp4, ];
2026-07-20 16:05:17 +00:00
if ("none" !== str) {
const obj3 = {};
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj3.style = backgroundColor.fill;
if ("none" === str) {
let num = 0;
2026-08-06 08:05:19 +00:00
const obj4 = { blurAmount: null, style: null, blurTheme: null, tintColor: null, android_fallbackColor: null };
2026-07-29 08:29:29 +00:00
obj4[0] = num;
obj4[1] = backgroundColor.fill;
obj4[2] = obj.useThemeContext().theme;
2026-08-06 08:05:19 +00:00
obj4[3] = backgroundColor.backdrop.backgroundColor;
2026-07-29 08:29:29 +00:00
backgroundColor = backgroundColor.backdrop.backgroundColor;
obj4[4] = backgroundColor;
2026-08-06 08:05:19 +00:00
obj3.children = tmp7(tmp15, obj4);
2026-07-29 08:29:29 +00:00
} else if ("subtle" !== str) {
num = 0.25;
}
num = 0.05;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj5 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(obj);
2026-08-06 08:05:19 +00:00
const items3 = [backgroundColor.fill, flag ? backgroundColor.backdropOpaque : backgroundColor.backdrop];
obj5.style = items3;
items2[1] = tmp7(tmp8, obj5);
obj[3] = items2;
2026-08-24 06:08:38 +00:00
return closure_5(_modDef4119.View, obj);
2026-07-20 16:05:17 +00:00
}
};