import { getOriginal } from "./Event.mjs";
import { isMac } from "./Platform.mjs";
function isButton(event, button) {
  return (getOriginal(event) || event).button === button;
}
function isPrimaryButton(event) {
  return isButton(event, 0);
}
function isAuxiliaryButton(event) {
  return isButton(event, 1);
}
function hasPrimaryModifier(event) {
  var originalEvent = getOriginal(event) || event;
  if (!isPrimaryButton(event)) {
    return false;
  }
  if (isMac()) {
    return originalEvent.metaKey;
  } else {
    return originalEvent.ctrlKey;
  }
}
function hasSecondaryModifier(event) {
  var originalEvent = getOriginal(event) || event;
  return isPrimaryButton(event) && originalEvent.shiftKey;
}
export {
  hasPrimaryModifier,
  hasSecondaryModifier,
  isAuxiliaryButton,
  isButton,
  isMac,
  isPrimaryButton
};
