decord/source/modules/user_profile/native/ActionSheetBackdropToast.tsx

104 lines
5.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12411
// Function ID: 12412
2026-07-20 16:05:17 +00:00
// Name: ActionSheetBackdropToast
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 6989, 21, 500, 4668, 712, 1629, 1494, 6401, 4119, 4671, 4739, 2]
2026-07-20 16:05:17 +00:00
// Exports: ActionSheetBackdropToast
2026-08-24 06:08:38 +00:00
// Module 12411 (ActionSheetBackdropToast)
import ThemesDefault from "Themes" /* 712 */;
import useWindowDimensionsDefault from "useWindowDimensions" /* 1494 */;
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1629 */;
import _modDef4119 from "module_4119" /* 4119 */;
import closure_3 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { ACTION_SHEET_START_HEIGHT_RATIO as closure_5 } from "ACTION_SHEET_START_HEIGHT_RATIO" /* 6989 */;
import { jsx } from "jsxProd" /* 21 */;
import set from "set" /* 500 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ View: c4, StyleSheet } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
let closure_7 = set.isIOS();
2026-07-29 08:29:29 +00:00
set = { container: null, toast: null };
2026-07-23 10:11:24 +00:00
set = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(StyleSheet.absoluteFillObject);
set.flex = 1;
set.alignItems = "center";
set.justifyContent = "center";
set[0] = set;
2026-08-24 06:08:38 +00:00
createCacheKey = { position: "absolute", bottom: 16, backgroundColor: ThemesDefault.colors.MOBILE_TOAST_BACKGROUND_DEFAULT, borderRadius: ThemesDefault.radii.round, paddingTop: 6, paddingBottom: 8, paddingHorizontal: 16 };
2026-07-29 08:29:29 +00:00
set[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_8 = createCacheKey.createStyles(set);
2026-07-20 16:05:17 +00:00
let closure_9 = { code: "function ActionSheetBackdropToastTsx1(){const{isInIOS,isExpanded,maxDynamicContentSize,TOAST_BOTTOM_MARGIN,nonExpandedHeight,ACTION_SHEET_START_HEIGHT_RATIO,TOAST_BOTTOM_GAP,positionDelta,TOAST_ANIMATION_Y_DELTA,opacity}=this.__closure;return{bottom:(isInIOS?isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:nonExpandedHeight+TOAST_BOTTOM_MARGIN:isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:ACTION_SHEET_START_HEIGHT_RATIO*maxDynamicContentSize+TOAST_BOTTOM_GAP)+ +(1-positionDelta.get())*TOAST_ANIMATION_Y_DELTA,opacity:opacity.get()};}" };
2026-07-23 10:11:24 +00:00
let result = set.fileFinishedImporting("modules/user_profile/native/ActionSheetBackdropToast.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const ActionSheetBackdropToast = function ActionSheetBackdropToast(children) {
const isExpanded = children.isExpanded;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let sharedValue;
let sharedValue1;
2026-08-24 06:08:38 +00:00
const tmp = callback();
const height = useWindowDimensionsDefault().height;
2026-07-23 10:11:24 +00:00
let result = height * closure_5;
importDefault = result;
2026-08-24 06:08:38 +00:00
const diff = height - isExpanded(6401).NAV_BAR_HEIGHT_MULTILINE - useSafeAreaInsetsDefault().top;
2026-07-29 08:29:29 +00:00
dependencyMap = diff;
2026-08-24 06:08:38 +00:00
let obj = isExpanded(4119);
2026-07-29 08:29:29 +00:00
sharedValue = obj.useSharedValue(0);
2026-08-24 06:08:38 +00:00
obj1 = isExpanded(4119);
2026-07-29 08:29:29 +00:00
sharedValue1 = obj1.useSharedValue(0);
2026-07-20 16:05:17 +00:00
const items = [sharedValue, sharedValue1];
2026-07-23 10:11:24 +00:00
const effect = sharedValue.useEffect(() => {
2026-07-29 08:29:29 +00:00
let obj = isExpanded(_undefined[10]);
obj = { duration: 200, easing: null };
let Easing = isExpanded(_undefined[10]).Easing;
obj[1] = Easing.in(isExpanded(_undefined[10]).Easing.ease);
let result = sharedValue.set(obj.withDelay(100, isExpanded(_undefined[11]).withTiming(1, obj)));
let obj2 = isExpanded(_undefined[11]);
obj = { duration: 300, easing: null };
const Easing2 = isExpanded(_undefined[10]).Easing;
obj[1] = Easing2.in(isExpanded(_undefined[10]).Easing.linear);
let result1 = sharedValue1.set(isExpanded(_undefined[11]).withTiming(1, obj));
2026-07-20 16:05:17 +00:00
return () => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_0(closure_1_2[10]);
const result = closure_3.set(obj.withDelay(200, closure_1_0(closure_1_2[11]).withTiming(0)));
const obj2 = closure_1_0(closure_1_2[11]);
2026-07-29 08:29:29 +00:00
obj = { duration: 200, easing: null };
2026-08-24 06:08:38 +00:00
const Easing = closure_1_0(closure_1_2[10]).Easing;
obj[1] = Easing.out(closure_1_0(closure_1_2[10]).Easing.exp);
const result1 = closure_4.set(closure_1_0(closure_1_2[11]).withTiming(0, obj));
2026-07-20 16:05:17 +00:00
};
}, items);
const fn = function x() {
2026-08-24 06:08:38 +00:00
if (closure_1_7) {
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
let sum = c2 + 24;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
sum = c1 + 24;
2026-07-20 16:05:17 +00:00
}
} else {
if (tmp) {
2026-07-29 08:29:29 +00:00
let sum1 = c2 + 24;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
sum1 = closure_1_5 * c2 + 46;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { bottom: null, opacity: null };
obj[0] = sum1 + 15 * (1 - sharedValue.get());
obj[1] = sharedValue1.get();
2026-07-20 16:05:17 +00:00
return obj;
}
};
2026-08-24 06:08:38 +00:00
obj = { isInIOS: closure_7, isExpanded, maxDynamicContentSize: diff, TOAST_BOTTOM_MARGIN: 24, nonExpandedHeight: result, ACTION_SHEET_START_HEIGHT_RATIO: closure_5, TOAST_BOTTOM_GAP: 46, positionDelta: sharedValue, TOAST_ANIMATION_Y_DELTA: 15, opacity: sharedValue1 };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 9630436597435;
fn.__initData = closure_9;
2026-07-29 08:29:29 +00:00
obj = { style: items1, pointerEvents: "none", children: null };
2026-07-23 10:11:24 +00:00
items1 = [tmp.container];
2026-08-24 06:08:38 +00:00
const animatedStyle = isExpanded(4119).useAnimatedStyle(fn);
obj1 = { style: items2, children: jsx(isExpanded(4739).Text, { variant: "text-sm/medium", color: "mobile-text-heading-primary", children: children.text }) };
2026-07-23 10:11:24 +00:00
items2 = [tmp.toast, animatedStyle];
2026-08-24 06:08:38 +00:00
obj[2] = jsx(_modDef4119.View, { style: items2, children: jsx(isExpanded(4739).Text, { variant: "text-sm/medium", color: "mobile-text-heading-primary", children: children.text }) });
2026-07-29 08:29:29 +00:00
return <sharedValue1 style={items1} pointerEvents="none">{null}</sharedValue1>;
2026-07-20 16:05:17 +00:00
};