60 lines
3.7 KiB
TypeScript
60 lines
3.7 KiB
TypeScript
/* Metro module 11621; source: modules/action_sheet/native/useCustomKeyboardBottomSheetConfig.tsx; dependencies: [31, 4502, 477, 1851, 4022, 1583, 1478, 11577, 6518, 11283, 2] */
|
|
function _fun89082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11807:6, offset: 0x01ffe1b4, size: 137 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/action_sheet/native/useCustomKeyboardBottomSheetConfig.tsx');
|
|
exports.default = useCustomKeyboardBottomSheetConfig;
|
|
}
|
|
|
|
function useCustomKeyboardBottomSheetConfig({forceMaxHeight, enablePanDownToClose}) { // fn#89083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11807:227, offset: 0x01ffe23d, size: 334 bytes, params: 2, frame: 23
|
|
var object2;
|
|
forceMaxHeight = !(forceMaxHeight === undefined) && forceMaxHeight;
|
|
enablePanDownToClose = !(enablePanDownToClose === undefined) && enablePanDownToClose;
|
|
const value5 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true});
|
|
const {minimum, maximum} = (importDefault(11577) /* metro dependency 11577: useKeyboardActionSheetHeight */)();
|
|
const env0_3 = maximum;
|
|
const {initialPosition,
|
|
animateOnMount} = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun89084);
|
|
const value8 = env0_3.useMemo(function() {
|
|
return forceMaxHeight ? [maximum, maximum] : [minimum, maximum];
|
|
}, [forceMaxHeight, maximum, minimum]);
|
|
object2 = {animateOnMount: animateOnMount, enablePanDownToClose: enablePanDownToClose};
|
|
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
|
object2.accessible = isAndroid2 ? undefined : !!isAndroid2;
|
|
object2.contentHeight = maximum;
|
|
object2.containerHeight = value5.height;
|
|
object2.enableDynamicSizing = false;
|
|
object2.initialPosition = initialPosition;
|
|
object2.keyboardBehavior = 'extend';
|
|
object2.android_keyboardInputMode = (require(11283) /* metro dependency 11283: useSafeAreaBottomKeyboardInfoController */).IS_SYSTEM_KEYBOARD_EXTERNAL ? 'adjustResize' : undefined;
|
|
object2.snapPoints = value8;
|
|
return object2;
|
|
}
|
|
|
|
function _fun89084() { // fn#89084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11807:402, offset: 0x01ffe38b, size: 211 bytes, params: 1, frame: 16
|
|
var r1;
|
|
var r0;
|
|
const object2 = {initialPosition: env0_1.height - minimum, animateOnMount: false};
|
|
let value = environment.__proto__;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isAndroid()) {
|
|
r0 = object2;
|
|
} else if (AccessibilityStore.useReducedMotion) {
|
|
r0 = object2;
|
|
} else {
|
|
if ((require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight() !== 0) {
|
|
r1 = object2;
|
|
} else {
|
|
value = require(4022) /* metro dependency 4022: useKeyboardType */;
|
|
value = value.getKeyboardTypePrevious();
|
|
r1 = value !== (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM ? object2 : {animateOnMount: true};
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|