// src/components/QRReader/utils.ts
var isMediaDevicesSupported = () => {
  const isMediaDevicesSupported2 = typeof navigator !== "undefined" && !!navigator.mediaDevices;
  if (!isMediaDevicesSupported2) {
    console.warn(
      `[ReactQRReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"`
    );
  }
  return isMediaDevicesSupported2;
};
var isValidType = (value, name, type) => {
  const isValid = typeof value === type;
  if (!isValid) {
    console.warn(
      `[ReactQRReader]: Expected "${name}" to be a of type "${type}".`
    );
  }
  return isValid;
};

export {
  isMediaDevicesSupported,
  isValidType
};
