import { KEYBOARD_RELEASE_EVENT_TYPES } from "./constants";

export function isPossibleKeyboardCloseEvent(
  event: Event,
  hadInputLift: boolean,
): boolean {
  if (!hadInputLift) {
    return event.type === "resize" || event.type === "geometrychange";
  }
  return KEYBOARD_RELEASE_EVENT_TYPES.has(event.type);
}
