Files
discord-decomp/sources/by-id/module-06332-BottomSheetFooter.jsx
2026-07-28 01:06:53 +03:00

82 lines
4.9 KiB
React

/* Metro module 6332; source: unknown; dependencies: [31, 33, 6282, 1610, 6278, 6333] */
import React from './module-00031-React.js'; /* Metro dependency 31 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as moduleValue2 from './module-01610.js'; /* Metro dependency 1610 */
import * as Module06278Module from './module-06278.js'; /* Metro dependency 6278 */
import * as StylesModule from './module-06333-styles.js'; /* Metro dependency 6333 */
function _fun49800(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6510:6, offset: 0x012090de, size: 177 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const memo = value.memo;
const env0_3 = value.useCallback;
const env0_4 = value.useMemo;
const env0_5 = value.useRef;
React;
object = {code: 'function pnpm_BottomSheetFooterTsx1(){const{animatedFooterPosition,animatedKeyboardState,KEYBOARD_STATE,bottomInset}=this.__closure;let footerTranslateY=animatedFooterPosition.get();if(animatedKeyboardState.get()!==KEYBOARD_STATE.SHOWN){footerTranslateY=footerTranslateY-bottomInset;}return{transform:[{translateY:Math.max(0,footerTranslateY)}]};}'};
value = memo(BottomSheetFooterComponent);
value.displayName = 'BottomSheetFooter';
exports.BottomSheetFooter = value;
function BottomSheetFooterComponent({animatedFooterPosition, bottomInset, style, children}) { // fn#49801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6510:546, offset: 0x0120918f, size: 382 bytes, params: 2, frame: 29
const r18 = bottomInset === undefined ? 0 : bottomInset;
const value3 = useRef(null);
const {animatedFooterHeight,
animatedKeyboardState} = (require(6282) /* metro dependency 6282 */).useBottomSheetInternal();
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
const pnpm_BottomSheetFooterTsx12 = pnpm_BottomSheetFooterTsx1;
const object = {animatedFooterPosition: animatedFooterPosition, animatedKeyboardState: animatedKeyboardState};
const KEYBOARD_STATE = (Module06278Module).KEYBOARD_STATE;
object.KEYBOARD_STATE = KEYBOARD_STATE;
object.bottomInset = r18;
pnpm_BottomSheetFooterTsx12.__closure = object;
pnpm_BottomSheetFooterTsx12.__workletHash = 5322275157644;
pnpm_BottomSheetFooterTsx12.__initData = env0_7;
const value6 = useMemo(_fun49803, [style, Reflect.apply(useAnimatedStyle, moduleValue2,
[pnpm_BottomSheetFooterTsx12, [r18, animatedKeyboardState, animatedFooterPosition]])]);
const value7 = useCallback(function(a0) {
animatedFooterHeight.set(a0.nativeEvent.layout.height);
}, [animatedFooterHeight]);
(require(6282) /* metro dependency 6282 */).useBoundingClientRect(value3, useCallback(function({height}) {
animatedFooterHeight.set(height);
}, [animatedFooterHeight]));
if (children === null) {
return null;
} else {
const View = (importDefault(1610) /* metro dependency 1610 */).View;
return (
<View
ref={value3}
onLayout={value7}
style={value6}
>
{children}
</View>
);
}
function pnpm_BottomSheetFooterTsx1() { // fn#49802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6510:801, owner: BottomSheetFooterComponent.pnpm_BottomSheetFooterTsx1, offset: 0x0120930d, size: 125 bytes, params: 1, frame: 15
const value2 = animatedFooterPosition.get();
const value3 = animatedKeyboardState.get();
const KEYBOARD_STATE = (Module06278Module).KEYBOARD_STATE;
const SHOWN = KEYBOARD_STATE.SHOWN;
const r5 = value3 === SHOWN ? value2 : value2 - env0_1;
const object2 = {};
const Math = global.Math;
object2.translateY = Math.max(0, r5);
return {transform: [object2]};
}
function _fun49803() { // fn#49803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6510:1125, offset: 0x0120938a, size: 65 bytes, params: 1, frame: 11
const styles = (StylesModule).styles;
return [styles.container, style, env0_5];
}
}
}
global.__d(_fun49800, 6332, [31, 33, 6282, 1610, 6278,
6333]) /* metro module 6332, dependencies: [31, 33, 6282, 1610, 6278, 6333] */;