import { useEffect, useState } from 'react';
import { Keyboard, Platform } from 'react-native';
const useMobileKeyboardVisibility = () => {
  const [isKeyboardVisible, setKeyboardVisible] = useState(false);
  useEffect(() => {
    const showListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => {
      setKeyboardVisible(true);
    });
    const hideListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => {
      setKeyboardVisible(false);
    });
    return () => {
      showListener.remove();
      hideListener.remove();
    };
  }, []);
  return isKeyboardVisible;
};
export default useMobileKeyboardVisibility;
//# sourceMappingURL=use-mobile-keyboard-visibility.js.map