"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useKeyboardStatus = void 0;
var _react = require("react");
var _reactNative = require("react-native");
const useKeyboardStatus = () => {
  const [isKeyboardShowing, setIsKeyboardShowing] = (0, _react.useState)(false);
  const [keyboardHeight, setKeyboardHeight] = (0, _react.useState)(0);
  (0, _react.useEffect)(() => {
    const showSubscription = _reactNative.Keyboard.addListener('keyboardDidShow', event => {
      setIsKeyboardShowing(true);
      setKeyboardHeight(event.endCoordinates.height);
    });
    const hideSubscription = _reactNative.Keyboard.addListener('keyboardDidHide', () => {
      setIsKeyboardShowing(false);
      setKeyboardHeight(0);
    });
    return () => {
      showSubscription.remove();
      hideSubscription.remove();
    };
  }, []);
  return {
    isKeyboardShowing,
    keyboardHeight
  };
};
exports.useKeyboardStatus = useKeyboardStatus;
//# sourceMappingURL=useKeyboardStatus.js.map