export type SearchOpenMode = "main" | "new-window" | "sidebar";

interface ShortcutLikeEvent {
  metaKey?: boolean;
  ctrlKey?: boolean;
  altKey?: boolean;
}

export const resolveSearchOpenMode = (event: ShortcutLikeEvent): SearchOpenMode => {
  if (event.metaKey || event.ctrlKey) {
    return "new-window";
  }
  if (event.altKey) {
    return "sidebar";
  }
  return "main";
};
