2026-09-14 20:04:03 +00:00
|
|
|
// Module ID: 11490
|
|
|
|
|
// Function ID: 11491
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: useKeyboardActionSheetHeight
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [5763, 1611, 1477, 5660, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default, getKeyboardActionSheetHeight
|
|
|
|
|
|
2026-09-14 20:04:03 +00:00
|
|
|
// Module 11490 (useKeyboardActionSheetHeight)
|
2026-09-05 10:56:28 +00:00
|
|
|
import useWindowDimensions from "useWindowDimensions" /* 1477 */;
|
|
|
|
|
import useSafeAreaInsets from "useSafeAreaInsets" /* 1611 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import useCustomKeyboardHeight from "useCustomKeyboardHeight" /* 5660 */;
|
|
|
|
|
import NavigatorConstants from "NavigatorConstants" /* 5763 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const useWindowDimensionsDefault = useWindowDimensions;
|
|
|
|
|
const useSafeAreaInsetsDefault = useSafeAreaInsets;
|
|
|
|
|
const useCustomKeyboardHeightDefault = useCustomKeyboardHeight;
|
|
|
|
|
|
|
|
|
|
const result = size.fileFinishedImporting("modules/action_sheet/native/useKeyboardActionSheetHeight.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useKeyboardActionSheetHeight() {
|
2026-08-25 06:04:03 +00:00
|
|
|
const tmp2 = useSafeAreaInsetsDefault();
|
|
|
|
|
const tmp3 = useWindowDimensionsDefault({ ignoreKeyboard: true });
|
2026-09-10 05:38:07 +00:00
|
|
|
const maximum = Math.max(0, tmp3.height - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE - tmp2.top);
|
2026-08-25 06:04:03 +00:00
|
|
|
let minimum = Math.min(useCustomKeyboardHeightDefault(), maximum);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (minimum >= maximum) {
|
2026-08-25 06:04:03 +00:00
|
|
|
const _Math = Math;
|
2026-09-10 05:38:07 +00:00
|
|
|
minimum = Math.max(0, maximum - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return { minimum, maximum };
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const getKeyboardActionSheetHeight = function getKeyboardActionSheetHeight() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const safeAreaInsets = useSafeAreaInsets.getSafeAreaInsets();
|
|
|
|
|
const windowDimensions = useWindowDimensions.getWindowDimensions({ ignoreKeyboard: true });
|
2026-08-25 06:04:03 +00:00
|
|
|
const customKeyboardHeight = useCustomKeyboardHeight.getCustomKeyboardHeight();
|
2026-09-10 05:38:07 +00:00
|
|
|
const maximum = Math.max(0, windowDimensions.height - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE - safeAreaInsets.top);
|
2026-08-25 06:04:03 +00:00
|
|
|
let minimum = Math.min(customKeyboardHeight, maximum);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (minimum >= maximum) {
|
2026-08-25 06:04:03 +00:00
|
|
|
const _Math = Math;
|
2026-09-10 05:38:07 +00:00
|
|
|
minimum = Math.max(0, maximum - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return { minimum, maximum };
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|