"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const useFallbackClipboard = require("./use-fallback-clipboard.cjs");
const useClipboard$1 = require("../../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-clipboard/use-clipboard.cjs");
const isClipboardApiSupported = () => {
  return !!(window.isSecureContext && (navigator == null ? void 0 : navigator.clipboard));
};
function useClipboard({ timeout = 2e3 } = {}) {
  const clipboard = useClipboard$1.useClipboard({ timeout });
  const fallbackClipboard = useFallbackClipboard.useFallbackClipboard({ timeout });
  if (isClipboardApiSupported()) {
    return clipboard;
  }
  return fallbackClipboard;
}
exports.useClipboard = useClipboard;
