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

82 lines
4.5 KiB
React

/* Metro module 6320; source: unknown; dependencies: [31, 27, 33, 6321, 6282, 6278] */
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 StylesModule from './module-06321-styles.js'; /* Metro dependency 6321 */
function _fun49770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6498:6, offset: 0x01207acd, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const memo = value.memo;
const env0_2 = value.useMemo;
const env0_3 = value.useRef;
React;
value = require(27) /* metro dependency 27 */;
const env0_4 = value.StatusBar;
const env0_5 = value.View;
value = memo(BottomSheetHostingContainerComponent);
value.displayName = 'BottomSheetHostingContainer';
exports.BottomSheetHostingContainer = value;
function BottomSheetHostingContainerComponent({containerHeight, containerOffset, topInset, bottomInset, shouldCalculateHeight, detached, style, children}) { // fn#49771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6498:204, offset: 0x01207b80, size: 255 bytes, params: 2, frame: 21
return (
<View
ref={useRef(null)}
pointerEvents="box-none"
onLayout={shouldCalculateHeight === undefined || shouldCalculateHeight ? (require(6282) /* metro dependency 6282 */).useStableCallback(handleLayoutEvent) : undefined}
style={useMemo(_fun49772, [style, detached, topInset === undefined ? 0 : topInset,
bottomInset === undefined ? 0 : bottomInset])}
collapsable
>
{children}
</View>
);
function _fun49772() { // fn#49772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6498:453, offset: 0x01207c7f, size: 99 bytes, params: 1, frame: 13
const items2 = [style];
const styles = (StylesModule).styles;
items2[1] = styles.container;
items2[2] = {top: env0_2, bottom: env0_3, overflow: detached ? 'visible' : 'hidden'};
return items2;
}
function handleLayoutEvent({nativeEvent}) { // fn#49773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6498:588, owner: BottomSheetHostingContainerComponent.handleLayoutEvent, offset: 0x01207ce2, size: 74 bytes, params: 2, frame: 12
containerHeight.value = nativeEvent.layout.height;
const current = JsxRuntimeModule.jsx.current;
if (current != null) {
current.measure(_fun49774);
}
function _fun49774(a0, a1, a2, a3, a4, a5) { // fn#49774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6498:696, offset: 0x01207d2c, size: 178 bytes, params: 7, frame: 20
var object;
var value4;
var Math;
var max;
var value5;
var WINDOW_HEIGHT;
let value = a5;
let containerOffsetBinding = containerOffset;
if (containerOffsetBinding.value) {
containerOffsetBinding = containerOffset;
object = {'top': null, 'left': 0, 'right': 0};
value4 = 0;
object.top = value ?? value4;
Math = global.Math;
max = Math.max;
value5 = environment.__proto__.__proto__;
WINDOW_HEIGHT = (require(6278) /* metro dependency 6278 */).WINDOW_HEIGHT;
value = (value ?? value4) + height;
object.bottom = Reflect.apply(max, Math, [value4,
WINDOW_HEIGHT - (value + (StatusBar.currentHeight ?? value4))]);
containerOffsetBinding.value = object;
}
}
}
}
}
global.__d(_fun49770, 6320, [31, 27, 33, 6321, 6282,
6278]) /* metro module 6320, dependencies: [31, 27, 33, 6321, 6282, 6278] */;