Files
discord-decomp/sources/by-id/module-04536.jsx
T
2026-07-27 16:20:00 +03:00

101 lines
5.9 KiB
React

/* Metro module 4536; source: unknown; dependencies: [29, 31, 27, 33, 4534, 4519, 4537, 4525, 4540, 4514] */
function _fun38689(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4714:6, offset: 0x010c73f5, size: 245 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['children', 'headerConfig', 'activityState', 'shouldFreeze', 'stackPresentation',
'sheetAllowedDetents', 'contentStyle', 'style', 'screenId', 'onHeaderHeightChange', 'unstable_sheetFooter'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.Platform;
const StyleSheet = value2.StyleSheet;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.Fragment;
const env0_9 = value3.jsxs;
value = value.forwardRef(ScreenStackItem);
const env0_10 = StyleSheet.create({container: {flex: 1}, absoluteWithNoBottom: {'position': 'absolute', 'top': 0,
'start': 0, 'end': 0}});
exports.default = value;
}
function ScreenStackItem(a0, a1) { // fn#38690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4714:401, offset: 0x010c74ea, size: 830 bytes, params: 3, frame: 35
const children = a0.children;
const headerConfig = a0.headerConfig;
const activityState = a0.activityState;
const shouldFreeze = a0.shouldFreeze;
const stackPresentation = a0.stackPresentation;
const sheetAllowedDetents = a0.sheetAllowedDetents;
const contentStyle = a0.contentStyle;
const style = a0.style;
const screenId = a0.screenId;
const onHeaderHeightChange = a0.onHeaderHeightChange;
const unstable_sheetFooter = a0.unstable_sheetFooter;
let binding = env0_4;
const value2 = undefined;
const value3 = binding(a0, env0_3);
binding = env0_5;
const env0_1 = binding.useRef(null);
const useContext = binding.useContext;
const RNSScreensRefContext = (require(4534) /* metro dependency 4534 */).RNSScreensRefContext;
const env0_2 = Reflect.apply(useContext, binding, [RNSScreensRefContext]);
binding.useImperativeHandle(a1, _fun38691);
const r12 = stackPresentation ?? 'push';
const hidden = headerConfig == null ? value2 : headerConfig.hidden;
let r2 = hidden != null && hidden;
binding = env0_5;
var env0_4 = binding.useRef(r2);
binding.useEffect(_fun38692, [r2, r12]);
let r5 = value2 === (value3 == null ? value2 : value3.scrollEdgeEffects) || global.Object.values(value3.scrollEdgeEffects).some(function(a0) {
return a0 !== 'hidden';
});
r2 = value2 !== (headerConfig == null ? value2 : headerConfig.blurEffect) && headerConfig.blurEffect !== 'none';
const defaultImport = importDefault(4519) /* metro dependency 4519 */;
r5 = r5 && r2 && false;
defaultImport(r5,
'[RNScreens] Using both `blurEffect` and `scrollEdgeEffects` simultaneously may cause overlapping effects.');
Platform.constants.reactNativeVersion.minor;
const r23 = r12 !== 'formSheet' ? env0_10.container : sheetAllowedDetents === 'fitToContents' ? env0_10.absoluteWithNoBottom : env0_10.container;
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const items2 = [((Component) => <Component contentStyle={contentStyle} style={r23} stackPresentation={r12}>{children}</Component>)(importDefault(4537) /* metro dependency 4537 */)];
const ScreenStackHeaderConfig = (require(4525) /* metro dependency 4525 */).ScreenStackHeaderConfig;
let Object = global.Object;
let assign = Object.assign;
items2[1] = <ScreenStackHeaderConfig {...Reflect.apply(assign, Object, [{}, headerConfig])} />;
items2[2] = r12 === 'formSheet' && unstable_sheetFooter && ((FooterComponent) => <FooterComponent>{unstable_sheetFooter()}</FooterComponent>)((require(4540) /* metro dependency 4540 */).FooterComponent);
const fragment = <>{items2}</>;
const value = importDefault(4514) /* metro dependency 4514 */;
Object = global.Object;
assign = Object.assign;
const largeTitle = headerConfig == null ? value2 : headerConfig.largeTitle;
return ((Component) => <Component {...Reflect.apply(assign, Object, [{'ref': null, 'enabled': true,
'isNativeStack': true, ref: ref_38694, activityState: activityState, shouldFreeze: shouldFreeze,
screenId: screenId, stackPresentation: r12, hasLargeHeader: largeTitle != null && largeTitle,
sheetAllowedDetents: sheetAllowedDetents, style: [style, value2], onHeaderHeightChange: onHeaderHeightChange},
value3, {children: fragment}])} />)(value);
}
function _fun38692() { // fn#38692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4714:856, offset: 0x010c7828, size: 58 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(4519) /* metro dependency 4519 */)(false,
"Dynamically changing header's visibility in modals will result in remounting the screen and losing all local state.");
env0_4.current = env0_3;
}
function ScreenStackItemRef(a0) { // fn#38694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4714:1771, owner: ScreenStackItem.ref, offset: 0x010c786f, size: 93 bytes, params: 2, frame: 14
var current;
env0_1.current = a0;
if (env0_2 !== null) {
current = env0_2.current;
if (a0 === null) {
delete current[screenId];
} else {
current[screenId] = {current: a0};
}
} else {
global.console.warn('Looks like RNSScreensRefContext is missing. Make sure the ScreenStack component is wrapped in it');
}
}