"use client";
const require_use_isomorphic_effect = require("../use-isomorphic-effect/use-isomorphic-effect.cjs");
let react = require("react");
//#region packages/@mantine/hooks/src/use-eye-dropper/use-eye-dropper.ts
function useEyeDropper() {
	const [supported, setSupported] = (0, react.useState)(false);
	require_use_isomorphic_effect.useIsomorphicEffect(() => {
		setSupported(typeof window !== "undefined" && !isOpera() && "EyeDropper" in window);
	}, []);
	return {
		supported,
		open: (0, react.useCallback)((options = {}) => {
			if (supported) return new window.EyeDropper().open(options);
			return Promise.resolve(void 0);
		}, [supported])
	};
}
function isOpera() {
	return navigator.userAgent.includes("OPR");
}
//#endregion
exports.useEyeDropper = useEyeDropper;

//# sourceMappingURL=use-eye-dropper.cjs.map