75 lines
4.1 KiB
React
75 lines
4.1 KiB
React
/* Metro module 6332; source: unknown; dependencies: [31, 33, 6282, 1610, 6278, 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 = require(31) /* metro dependency 31 */;
|
|
const memo = value.memo;
|
|
const env0_3 = value.useCallback;
|
|
const env0_4 = value.useMemo;
|
|
const env0_5 = value.useRef;
|
|
importDefault(31) /* metro dependency 31 */;
|
|
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
|
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 moduleValue2 = require(1610) /* metro dependency 1610 */;
|
|
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
|
const closure = pnpm_BottomSheetFooterTsx1;
|
|
const object2 = {animatedFooterPosition: animatedFooterPosition, animatedKeyboardState: animatedKeyboardState};
|
|
const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE;
|
|
object2.KEYBOARD_STATE = KEYBOARD_STATE;
|
|
object2.bottomInset = r18;
|
|
closure.__closure = object2;
|
|
closure.__workletHash = 5322275157644;
|
|
closure.__initData = env0_7;
|
|
const value6 = useMemo(_fun49803, [style, Reflect.apply(useAnimatedStyle, moduleValue2, [closure, [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 = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE;
|
|
const SHOWN = KEYBOARD_STATE.SHOWN;
|
|
const r5 = value3 === SHOWN ? value2 : value2 - env0_1;
|
|
const object = {};
|
|
const Math = global.Math;
|
|
object.translateY = Math.max(0, r5);
|
|
return {transform: [object]};
|
|
}
|
|
|
|
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 = (require(6333) /* metro dependency 6333 */).styles;
|
|
return [styles.container, style, env0_5];
|
|
}
|
|
|