// Module ID: 15561 // Function ID: 119512 // Dependencies: [57, 31, 11185, 33, 4026, 4563, 10369, 1820, 1555, 4031, 11186, 4511, 11229, 9567, 2] // Module 15561 import _slicedToArray from "_slicedToArray"; import importAllResult from "result"; import { KEYBOARD_ANIMATION_CONFIG } from "KEYBOARD_ANIMATION_DURATION"; import { jsx } from "jsxProd"; const require = arg1; let closure_7 = { code: "function ExpressionPickerKeyboardTsx1(){const{bottomSheetIndex}=this.__closure;return Math.max(bottomSheetIndex.get(),0)>0;}" }; let closure_8 = { code: "function ExpressionPickerKeyboardTsx2(){const{bottomSheetExpandingOrExpanded,maximum,minimum}=this.__closure;return{height:bottomSheetExpandingOrExpanded.get()?maximum:minimum};}" }; const memoResult = importAllResult.memo(function ExpressionPickerKeyboard(channel) { const chatInputRef = channel.chatInputRef; const onClose = channel.onClose; const transitionState = channel.transitionState; let obj = chatInputRef(transitionState[4]); const sharedValue = obj.useSharedValue(-1); const sharedValue1 = chatInputRef(transitionState[4]).useSharedValue(0); ref = ref.useRef(null); const obj2 = chatInputRef(transitionState[4]); const isScreenReaderEnabled = chatInputRef(transitionState[5]).useIsScreenReaderEnabled(); const tmp5 = sharedValue(ref.useState(false), 2); const first = tmp5[0]; let closure_7 = tmp5[1]; const items = [chatInputRef]; const items1 = [chatInputRef]; const callback = ref.useCallback((arg0) => { const current = chatInputRef.current; current.insertText(onClose(transitionState[6])(arg0), null, true); let obj = chatInputRef(transitionState[7]); const result = obj.dismissGlobalKeyboard(); const current2 = chatInputRef.current; obj = { type: chatInputRef(transitionState[8]).KeyboardTypes.EXPRESSION }; current2.openCustomKeyboard(obj); const current3 = ref.current; if (null != current3) { current3.snapToIndex(0); } }, items); const items2 = [chatInputRef]; const callback1 = ref.useCallback((url) => { const current = chatInputRef.current; current.handleSelectGIF(url); const current2 = chatInputRef.current; current2.openSystemKeyboard(); }, items1); const items3 = [chatInputRef]; const callback2 = ref.useCallback((sticker) => { const current = chatInputRef.current; current.handleSelectSticker(sticker); const current2 = chatInputRef.current; current2.openSystemKeyboard(); const current3 = chatInputRef.current; current3.setText(""); }, items2); const callback3 = ref.useCallback(() => { const current = chatInputRef.current; current.backspace(); }, items3); const obj3 = chatInputRef(transitionState[5]); const keyboardContextForType = chatInputRef(transitionState[9]).useKeyboardContextForType(chatInputRef(transitionState[8]).KeyboardTypes.EXPRESSION); const tmp12 = onClose(transitionState[10])(); const minimum = tmp12.minimum; const maximum = tmp12.maximum; const obj4 = chatInputRef(transitionState[9]); const fn = function b() { return Math.max(sharedValue.get(), 0) > 0; }; fn.__closure = { bottomSheetIndex: sharedValue }; fn.__workletHash = 1982988107352; fn.__initData = closure_7; const derivedValue = chatInputRef(transitionState[4]).useDerivedValue(fn); const obj5 = chatInputRef(transitionState[4]); class S { constructor() { obj = { height: c10.get() ? maximum : minimum }; return obj; } } S.__closure = { bottomSheetExpandingOrExpanded: derivedValue, maximum, minimum }; S.__workletHash = 13253776832356; S.__initData = minimum; const items4 = [isScreenReaderEnabled, chatInputRef]; const animatedStyle = chatInputRef(transitionState[4]).useAnimatedStyle(S); const items5 = [first, onClose, transitionState]; const callback4 = ref.useCallback(() => { callback(true); if (isScreenReaderEnabled) { const current = chatInputRef.current; current.openSystemKeyboard(); } }, items4); const effect = ref.useEffect(() => { let tmp = first; if (first) { tmp = transitionState === chatInputRef(transitionState[11]).TransitionStates.YEETED; } if (tmp) { if (null != onClose) { onClose(); } } }, items5); obj = { ref, animatedIndex: sharedValue, animatedPosition: sharedValue1, forceMaxHeight: isScreenReaderEnabled, chatInputRef, animationConfigs: isScreenReaderEnabled, onClose: callback4, renderExpressionFooter: true, transitionState }; const obj6 = chatInputRef(transitionState[4]); obj = { nativeID: "expression-picker-sheet", style: animatedStyle, children: first(onClose(transitionState[13]), { bottomSheetRef: ref, bottomSheetIndex: sharedValue, onBackspace: callback3, onPressEmoji: callback, onPressGIF: callback1, onPressSticker: callback2, channel: channel.channel, expressionType: keyboardContextForType, inPortalKeyboard: true }) }; obj.children = first(onClose(transitionState[4]).View, obj); return first(onClose(transitionState[12]), obj, "expression-picker-" + isScreenReaderEnabled); }); let result = require("KEYBOARD_ANIMATION_DURATION").fileFinishedImporting("modules/expression_picker/native/ExpressionPickerKeyboard.tsx"); export default memoResult;