66 lines
4.4 KiB
TypeScript
66 lines
4.4 KiB
TypeScript
/* Metro module 11621; source: modules/action_sheet/native/useCustomKeyboardBottomSheetConfig.tsx; dependencies: [31, 4502, 477, 1851, 4022, 1583, 1478, 11577, 6518, 11283, 2] */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import UseInitialValue from '../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
|
|
import UseKeyboardActionSheetHeight from './useKeyboardActionSheetHeight.tsx'; /* Metro dependency 11577 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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
|
|
forceMaxHeight = !(forceMaxHeight === undefined) && forceMaxHeight;
|
|
enablePanDownToClose = !(enablePanDownToClose === undefined) && enablePanDownToClose;
|
|
const value5 = (UseWindowDimensionsNative)({ignoreKeyboard: true});
|
|
const {minimum, maximum} = (UseKeyboardActionSheetHeight)();
|
|
const maximum2 = maximum;
|
|
const {initialPosition,
|
|
animateOnMount} = (UseInitialValue)(_fun89084);
|
|
const value8 = maximum2.useMemo(function() {
|
|
return forceMaxHeight ? [maximum, maximum] : [minimum, maximum];
|
|
}, [forceMaxHeight, maximum, minimum]);
|
|
object = {animateOnMount: animateOnMount, enablePanDownToClose: enablePanDownToClose};
|
|
const isAndroid2 = (PlatformUtilsModule).isAndroid();
|
|
object.accessible = isAndroid2 ? undefined : !!isAndroid2;
|
|
object.contentHeight = maximum;
|
|
object.containerHeight = value5.height;
|
|
object.enableDynamicSizing = false;
|
|
object.initialPosition = initialPosition;
|
|
object.keyboardBehavior = 'extend';
|
|
object.android_keyboardInputMode = (require(11283) /* metro dependency 11283: useSafeAreaBottomKeyboardInfoController */).IS_SYSTEM_KEYBOARD_EXTERNAL ? 'adjustResize' : undefined;
|
|
object.snapPoints = value8;
|
|
return object;
|
|
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 object = {initialPosition: env0_1.height - minimum, animateOnMount: false};
|
|
let value = environment.__proto__;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
r0 = object;
|
|
} else if (AccessibilityStore.useReducedMotion) {
|
|
r0 = object;
|
|
} else {
|
|
if ((require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight() !== 0) {
|
|
r1 = object;
|
|
} else {
|
|
value = require(4022) /* metro dependency 4022: useKeyboardType */;
|
|
value = value.getKeyboardTypePrevious();
|
|
r1 = value !== (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM ? object : {animateOnMount: true};
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun89082, 11621, [31, 4502, 477, 1851, 4022, 1583, 1478, 11577, 6518, 11283,
|
|
2]) /* metro module 11621, dependencies: [31, 4502, 477, 1851, 4022, 1583, 1478, 11577, 6518, 11283, 2] */;
|