import { useState as o } from "react";
import { useIsoMorphicEffect as c } from "./use-iso-morphic-effect.js";
function s() {
  var n;
  let [e] = o(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [i, r] = o((n = e == null ? void 0 : e.matches) != null ? n : !1);
  return c(() => {
    if (!e) return;
    function t(a) {
      r(a.matches);
    }
    return e.addEventListener("change", t), () => e.removeEventListener("change", t);
  }, [e]), i;
}
export {
  s as useIsTouchDevice
};
