decord/source/design/components/Modal/native/ModalFloatingAction.native.tsx

95 lines
4 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 9926
// Function ID: 9927
2026-07-20 16:05:17 +00:00
// Name: ModalFloatingAction
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 17, 21, 4189, 4050, 3908, 1581, 4599, 4603, 4611, 689, 9927, 2]
2026-07-20 16:05:17 +00:00
// Exports: ModalFloatingAction, ModalFloatingActionSpacer
2026-07-29 08:29:29 +00:00
// Module 9926 (ModalFloatingAction)
import noop from "noop";
2026-07-23 10:11:24 +00:00
import get_ActivityIndicator from "get ActivityIndicator";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c4;
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ StyleSheet: c4, View: c5 } = get_ActivityIndicator);
({ jsx: closure_6, jsxs: error } = jsxProd);
let closure_8 = createCacheKey.createStyles({ floating: { position: "absolute", bottom: 0, width: "100%", paddingHorizontal: 16 }, spacer: { height: 96 } });
2026-07-20 16:05:17 +00:00
let closure_9 = { code: "function ModalFloatingActionNativeTsx1(){const{interpolate,sharedValue,floatingBackgroundColor,useReducedMotion}=this.__closure;return{opacity:interpolate(sharedValue.get(),[0,1],[0,1]),borderBottomColor:floatingBackgroundColor,borderBottomWidth:16,transform:[{translateY:interpolate(sharedValue.get(),[useReducedMotion?0.999999:0,1],[32,0])}]};}" };
2026-07-23 10:11:24 +00:00
let result = require("jsxProd").fileFinishedImporting("design/components/Modal/native/ModalFloatingAction.native.tsx");
2026-07-20 16:05:17 +00:00
export const ModalFloatingAction = function ModalFloatingAction(isVisible) {
isVisible = isVisible.isVisible;
const floatingBackgroundColor = isVisible.floatingBackgroundColor;
2026-07-29 08:29:29 +00:00
const merged = Object.assign(isVisible, Object.create(null));
2026-07-23 10:11:24 +00:00
let sharedValue;
let enabled;
2026-07-29 08:29:29 +00:00
let obj = isVisible(sharedValue[4]);
2026-07-20 16:05:17 +00:00
let num = 0;
if (isVisible) {
num = 1;
}
2026-07-23 10:11:24 +00:00
sharedValue = obj.useSharedValue(num);
2026-07-29 08:29:29 +00:00
enabled = enabled.useContext(tmp3(tmp4[5]).AccessibilityPreferencesContext).reducedMotion.enabled;
2026-07-23 10:11:24 +00:00
let items = [isVisible, sharedValue];
2026-07-29 08:29:29 +00:00
const tmp2 = callback2();
2026-07-23 10:11:24 +00:00
const effect = enabled.useEffect(() => {
2026-07-20 16:05:17 +00:00
let num = 0;
if (isVisible) {
num = 1;
}
const result = sharedValue.set(isVisible(sharedValue[7]).withSpring(num, isVisible(sharedValue[8]).SUBTLE_SPRING, "animate-always"));
}, items);
2026-07-29 08:29:29 +00:00
const tmp7 = floatingBackgroundColor(sharedValue[6])();
2026-07-20 16:05:17 +00:00
const fn = function y() {
2026-07-29 08:29:29 +00:00
let obj = { opacity: null, borderBottomColor: null, borderBottomWidth: 16, transform: null };
obj[0] = isVisible(sharedValue[4]).interpolate(sharedValue.get(), [0, 1], [0, 1]);
obj[1] = floatingBackgroundColor;
2026-07-20 16:05:17 +00:00
const obj2 = isVisible(sharedValue[4]);
let num = 0;
const value = sharedValue.get();
if (enabled) {
num = 0.999999;
}
2026-07-29 08:29:29 +00:00
obj = { translateY: isVisible(sharedValue[4]).interpolate(value, items, [32, 0]) };
items = [num, 1];
2026-07-20 16:05:17 +00:00
const items1 = [obj];
2026-07-29 08:29:29 +00:00
obj[3] = items1;
2026-07-20 16:05:17 +00:00
return obj;
};
2026-07-29 08:29:29 +00:00
obj = { interpolate: tmp3(tmp4[4]).interpolate, sharedValue, floatingBackgroundColor, useReducedMotion: enabled };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 1679390676673;
fn.__initData = closure_9;
2026-07-29 08:29:29 +00:00
const animatedStyle = isVisible(sharedValue[4]).useAnimatedStyle(fn);
obj = { style: items1, pointerEvents: null, children: null };
items1 = [animatedStyle, tmp2.floating, { paddingBottom: tmp7.bottom }];
2026-07-20 16:05:17 +00:00
let str = "none";
if (isVisible) {
str = "auto";
}
2026-07-29 08:29:29 +00:00
obj[1] = str;
const obj1 = { colors: null, locations: null, style: null };
const tmp10 = closure_7;
const tmp3Result = isVisible(sharedValue[4]);
const tmp6Result = floatingBackgroundColor(sharedValue[9]);
2026-07-23 10:11:24 +00:00
const obj6 = floatingBackgroundColor(sharedValue[10])(floatingBackgroundColor);
const items2 = [floatingBackgroundColor(sharedValue[10])(floatingBackgroundColor).alpha(0).hex(), floatingBackgroundColor];
2026-07-29 08:29:29 +00:00
obj1[0] = items2;
obj1[1] = [0, 0.5];
obj1[2] = absoluteFill.absoluteFill;
const items3 = [callback(tmp6Result, obj1), ];
let obj2 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj2.variant = "primary";
items3[1] = callback(isVisible(sharedValue[11]).ModalActionButton, obj2);
obj[2] = items3;
return tmp10(floatingBackgroundColor(sharedValue[4]).View, obj);
2026-07-20 16:05:17 +00:00
};
export const ModalFloatingActionSpacer = function ModalFloatingActionSpacer() {
return callback(closure_5, { style: callback2().spacer });
};