'use strict';

var React = require('react');

/**
 * This progressive enhancement uses an experimental API, it might change,
 * and at the time of authoring is not supported on iOS or mobile Firefox.
 * @see https://developer.mozilla.org/en-US/docs/Web/API/VirtualKeyboard
 */
function useVirtualKeyboard() {
  React.useEffect(() => {
    /* eslint-disable @typescript-eslint/no-unsafe-member-access, functional/immutable-data */
    if ('virtualKeyboard' in navigator) {
      const virtualKeyboard = navigator.virtualKeyboard;
      const initialOverlaysContent = virtualKeyboard.overlaysContent;
      virtualKeyboard.overlaysContent = true;
      return () => {
        virtualKeyboard.overlaysContent = initialOverlaysContent;
      };
    }
    /* eslint-enable @typescript-eslint/no-unsafe-member-access, functional/immutable-data */
  }, []);
}

exports.useVirtualKeyboard = useVirtualKeyboard;
//# sourceMappingURL=useVirtualKeyboard.js.map
