decord/source/design/components/Sheet/native/BottomSheetBackdrop.native.tsx

106 lines
3.6 KiB
TypeScript
Raw Normal View History

// Module ID: 7258
// Function ID: 7259
// Name: Sheet/BottomSheetBackdrop
// Dependencies: [19, 21, 4636, 6728, 6756, 4373, 5044, 2]
2026-07-20 16:05:17 +00:00
// Module 7258 (Sheet/BottomSheetBackdrop)
import ReanimatedRexport from "ReanimatedRexport" /* 4373 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const jsx = fn(21).jsx;
const createStyles = fn(4636);
let closure_4 = createStyles.createStyles({ container: { flex: 1 } });
2026-07-20 16:05:17 +00:00
let closure_5 = { code: "function BottomSheetBackdropNativeTsx1(){const{runOnJS,handleOnPress}=this.__closure;runOnJS(handleOnPress)();}" };
let closure_6 = { code: "function BottomSheetBackdropNativeTsx2(){const{interpolate,animatedIndex,disappearsOnIndex,appearsOnIndex,opacity}=this.__closure;return{opacity:interpolate(animatedIndex.get(),[-1,disappearsOnIndex,appearsOnIndex],[0,0,opacity])};}" };
const size = fn(2);
const result = size.fileFinishedImporting("design/components/Sheet/native/BottomSheetBackdrop.native.tsx");
export const BottomSheetBackdrop = noop.memo((animatedIndex) => {
2026-07-20 16:05:17 +00:00
animatedIndex = animatedIndex.animatedIndex;
let num = animatedIndex.opacity;
if (num === undefined) {
num = 1;
}
let num2 = animatedIndex.appearsOnIndex;
if (num2 === undefined) {
num2 = 0;
}
let num3 = animatedIndex.disappearsOnIndex;
if (num3 === undefined) {
num3 = -1;
}
let str = animatedIndex.pressBehavior;
if (str === undefined) {
str = "close";
}
const onPress = animatedIndex.onPress;
const style = animatedIndex.style;
let animatedStyle;
2026-07-23 10:11:24 +00:00
const tmp = str();
const container = tmp;
const bottomSheet = animatedIndex(num[3]).useBottomSheet();
const snapToIndex = bottomSheet.snapToIndex;
const close = bottomSheet.close;
2026-07-23 10:11:24 +00:00
let items = [snapToIndex, close, num3, str, onPress];
const onDismiss = num2.useCallback(() => {
2026-07-29 08:29:29 +00:00
if (onPress != null) {
tmp();
2026-07-20 16:05:17 +00:00
}
if ("close" === str) {
close();
2026-07-29 08:29:29 +00:00
} else if ("collapse" === tmp3) {
2026-07-20 16:05:17 +00:00
snapToIndex(num3);
2026-08-04 21:03:28 +00:00
} else if (typeof tmp3 === "number") {
2026-07-29 08:29:29 +00:00
snapToIndex(tmp3);
2026-07-20 16:05:17 +00:00
}
}, items);
2026-07-23 10:11:24 +00:00
const Gesture = animatedIndex(num[4]).Gesture;
let obj = animatedIndex(num[3]);
const tmp2 = animatedIndex;
const tmp3 = num;
2026-07-20 16:05:17 +00:00
class I {
constructor() {
obj = closure_0(closure_1[5]);
2026-08-24 06:08:38 +00:00
tmp = obj.runOnJS(closure_10)();
2026-07-20 16:05:17 +00:00
return;
}
}
const TapResult = Gesture.Tap();
I.__closure = { runOnJS: animatedIndex(num[5]).runOnJS, handleOnPress: onDismiss };
2026-07-20 16:05:17 +00:00
I.__workletHash = 3995467602852;
2026-07-23 10:11:24 +00:00
I.__initData = onPress;
const obj2 = { runOnJS: animatedIndex(num[5]).runOnJS, handleOnPress: onDismiss };
const onEndResult = TapResult.onEnd(I);
2026-07-20 16:05:17 +00:00
class S {
constructor() {
2026-07-29 08:29:29 +00:00
obj = { opacity: null };
obj2 = closure_0(closure_1[5]);
2026-07-29 08:29:29 +00:00
items = [-1];
2026-07-23 10:11:24 +00:00
items[1] = c3;
items[2] = c2;
items1 = [0, 0];
items1[2] = c1;
obj.opacity = obj2.interpolate(animatedIndex.get(), items, items1);
2026-07-20 16:05:17 +00:00
return obj;
}
}
const obj4 = animatedIndex(num[5]);
S.__closure = { interpolate: animatedIndex(num[5]).interpolate, animatedIndex, disappearsOnIndex: num3, appearsOnIndex: num2, opacity: num };
2026-07-20 16:05:17 +00:00
S.__workletHash = 1140766381376;
2026-07-23 10:11:24 +00:00
S.__initData = style;
animatedStyle = obj4.useAnimatedStyle(S);
2026-07-23 10:11:24 +00:00
let items1 = [tmp.container, style, animatedStyle];
const memo = num2.useMemo(() => {
2026-08-24 06:08:38 +00:00
const items = [container.container, style, animatedStyle];
2026-07-20 16:05:17 +00:00
return items;
}, items1);
const tmp10 = num3(animatedIndex(num[6]).Backdrop, { blur: "none", style: memo, onDismiss, "aria-hidden": true });
2026-07-29 08:29:29 +00:00
let tmp9Result = tmp10;
2026-07-20 16:05:17 +00:00
if ("none" !== str) {
const obj5 = { gesture: onEndResult, children: tmp10 };
tmp9Result = num3(tmp2(tmp3[4]).GestureDetector, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp9Result;
2026-07-20 16:05:17 +00:00
});