"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = require("react");
var _reactNative = require("react-native");
const useMobileKeyboardVisibility = () => {
  const [isKeyboardVisible, setKeyboardVisible] = (0, _react.useState)(false);
  (0, _react.useEffect)(() => {
    const showListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => {
      setKeyboardVisible(true);
    });
    const hideListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => {
      setKeyboardVisible(false);
    });
    return () => {
      showListener.remove();
      hideListener.remove();
    };
  }, []);
  return isKeyboardVisible;
};
var _default = exports.default = useMobileKeyboardVisibility;
//# sourceMappingURL=use-mobile-keyboard-visibility.js.map