import { useFallbackClipboard } from "./use-fallback-clipboard.mjs";
import { useClipboard as useClipboard$1 } from "../../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-clipboard/use-clipboard.mjs";
const isClipboardApiSupported = () => {
  return !!(window.isSecureContext && (navigator == null ? void 0 : navigator.clipboard));
};
function useClipboard({ timeout = 2e3 } = {}) {
  const clipboard = useClipboard$1({ timeout });
  const fallbackClipboard = useFallbackClipboard({ timeout });
  if (isClipboardApiSupported()) {
    return clipboard;
  }
  return fallbackClipboard;
}
export {
  useClipboard
};
