// Module ID: 11127 // Function ID: 11128 // Name: ModalFloatingAction // Dependencies: [19, 17, 21, 4636, 4373, 4357, 1611, 5055, 5059, 5068, 672, 11128, 2] // Exports: ModalFloatingAction, ModalFloatingActionSpacer // Module 11127 (ModalFloatingAction) import ReanimatedRexport from "ReanimatedRexport" /* 4373 */; import spring from "spring" /* 5055 */; import springPresets from "springPresets" /* 5059 */; import noop from "module_19" /* 19 */; require = fn; get_ActivityIndicator = fn(17); ({ StyleSheet: closure_4, View: hasOwnProperty } = get_ActivityIndicator); const jsxProd = fn(21); ({ jsx: metroRequire, jsxs: closure_7 } = jsxProd); const createStyles = fn(4636); let closure_8 = createStyles.createStyles({ floating: { position: "absolute", bottom: 0, width: "100%", paddingHorizontal: 16 }, spacer: { height: 96 } }); const __initData = { 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])}]};}" }; const size = fn(2); let result = size.fileFinishedImporting("design/components/Modal/native/ModalFloatingAction.native.tsx"); export const ModalFloatingAction = function ModalFloatingAction(isVisible) { isVisible = isVisible.isVisible; const floatingBackgroundColor = isVisible.floatingBackgroundColor; const merged = Object.assign(isVisible, Object.assign({ isVisible: 0, floatingBackgroundColor: 0 })); let sharedValue; let enabled; const tmp2 = closure_8(); let num = 0; if (isVisible) { num = 1; } sharedValue = isVisible(sharedValue[4]).useSharedValue(num); enabled = enabled.useContext(tmp3(tmp4[5]).AccessibilityPreferencesContext).reducedMotion.enabled; let items = [isVisible, sharedValue]; let obj = isVisible(sharedValue[4]); const effect = enabled.useEffect(() => { let num = 0; if (isVisible) { num = 1; } const result = sharedValue.set(spring.withSpring(num, springPresets.SUBTLE_SPRING, "animate-always")); }, items); const tmp7 = floatingBackgroundColor(sharedValue[6])(); const fn = function y() { const obj = { opacity: ReanimatedRexport.interpolate(sharedValue.get(), [0, 1], [0, 1]), borderBottomColor: floatingBackgroundColor, borderBottomWidth: 16, transform: null }; let num = 0; value = sharedValue.get(); if (enabled) { num = 0.999999; } const obj4 = { translateY: null }; const items = [num, 1]; obj4.translateY = ReanimatedRexport.interpolate(value, items, [32, 0]); const items1 = [obj4]; obj.transform = items1; return obj; }; const tmp3Result = isVisible(sharedValue[4]); fn.__closure = { interpolate: isVisible(sharedValue[4]).interpolate, sharedValue, floatingBackgroundColor, useReducedMotion: enabled }; fn.__workletHash = 1679390676673; fn.__initData = __initData; const animatedStyle = tmp3Result.useAnimatedStyle(fn); const obj3 = { style: null, pointerEvents: null, children: null }; let items1 = [animatedStyle, tmp2.floating, { paddingBottom: tmp7.bottom }]; obj3.style = items1; let str = "none"; if (isVisible) { str = "auto"; } obj3.pointerEvents = str; let obj4 = { colors: null, locations: null, style: null }; let obj2 = { interpolate: isVisible(sharedValue[4]).interpolate, sharedValue, floatingBackgroundColor, useReducedMotion: enabled }; const tmp10 = closure_7; const tmp6Result = floatingBackgroundColor(sharedValue[9]); const obj6 = floatingBackgroundColor(sharedValue[10])(floatingBackgroundColor); const items2 = [floatingBackgroundColor(sharedValue[10])(floatingBackgroundColor).alpha(0).hex(), floatingBackgroundColor]; obj4.colors = items2; obj4.locations = [0, 0.5]; obj4.style = absoluteFill.absoluteFill; const items3 = [closure_6(tmp6Result, obj4), ]; const obj5 = {}; const merged1 = Object.assign(merged); obj5.variant = "primary"; items3[1] = closure_6(isVisible(sharedValue[11]).ModalActionButton, obj5); obj3.children = items3; return tmp10(floatingBackgroundColor(sharedValue[4]).View, obj3); }; export const ModalFloatingActionSpacer = function ModalFloatingActionSpacer() { return timestampProducer(hasOwnProperty, { style: closure_8().spacer }); };