// Metro module 433 (f434). import { forwardRef } from "react"; import Module68 from "./Module68"; import Module434 from "./Module434"; import Module435 from "./Module435"; function $mk66560($env) { return function VirtualView_withRef(a0, a1) { const r11 = $env.$parent; const { children, hiddenStyle = r11[10] } = a0; const r15 = $env; let env23780 = { $parent: r11 }; env23780[0] = hiddenStyle; const { nativeID, style } = a0; env23780[1] = a0.onModeChange; const removeClippedSubviews = a0.removeClippedSubviews; env23780[2] = void 0; env23780[3] = void 0; env23780[4] = void 0; const r21 = (0, r11[3])((0, r11[6])(r15[0]), 2); const r14 = r21[0]; env23780[2] = r21[1]; const r23 = r14 !== r11[9]; env23780[3] = r23; const r24 = r11[0]; const r10 = r11[2]; env23780[4] = r24(r10[6]).useVirtualViewLogging(r23, nativeID); const r6 = r11[7]; const r29 = r11[8]; const r33 = VirtualViewRenderState; const renderState = r23 ? r33.None : r33.Rendered; let style2 = style; if (r23) { const r36 = r11[1]; style2 = r36(r10[8]).compose(style, r36(r10[7])(r14)); } return r6(r29, { initialHidden: r15[1], nativeID, ref: a1, removeClippedSubviews, renderState, style: style2, onModeChange: (a0) => { const r6 = env23780.$parent; const mode = (0, r6[1])(r6[2][7])(VirtualViewMode.cast(a0.nativeEvent.mode)); const r1 = env23780[3]; const r19 = VirtualViewRenderState; const r18 = { mode, renderState: r1 ? r19.None : r19.Rendered, target: a0.currentTarget, targetRect: a0.nativeEvent.targetRect, thresholdRect: a0.nativeEvent.thresholdRect }; const current = env23780[4].current; if (current != null) { current.logModeChange(r18); } const r31 = env23780[1]; const r32 = r31 == null ? null : r31.bind(null, r18); let c28652_1 = r32; if (mode !== VirtualViewMode.Visible) { if (mode !== VirtualViewMode.Prerender) { if (mode !== VirtualViewMode.Hidden) { throw Error("Match: No case succesfully matched. Make exhaustive or add a wildcard case using '_'. Argument: " + mode); } (0, r6[5])(() => { const r4 = env23780[2]; let r9 = (0, env23780[0])(a0.nativeEvent.targetRect); if (r9 == null) { r9 = {}; } r4(r9); if (c28652_1 != null) { c28652_1(); } }); } else { (0, r6[5])(() => { (0, env23780[2])(env23780.$parent[9]); if (c28652_1 != null) { c28652_1(); } }); } } else { (0, env23780[2])(r6[9]); if (r32 != null) { r32(); } } }, children: r23 ? null : children }); }; } let c447_8, c447_9, c448_0, c448_1; let env447; const r2 = env447 = {}; const defaultHiddenStyle = function defaultHiddenStyle(a0) { return { minHeight: a0.height, minWidth: a0.width }; }; const r37 = Module68.hasViewManagerConfig("VirtualView") && !Module68.hasViewManagerConfig("VirtualViewExperimental") ? Module434 : Module435; let env448; c447_8 = r37; c447_9 = null; const r39 = env448 = { $parent: r2 }; c448_0 = null; c448_1 = false; export default forwardRef($mk66560(r39)); export function createHiddenVirtualView(a0) { const r3 = a0 == null ? {} : a0; let env12326; const r1 = env12326 = { $parent: env447 }; env12326[0] = r3; env12326[1] = r3 !== c447_9; return forwardRef($mk66560(r1)); } export const _logs = {};