import * as a from "react";
import { arrayIncludes as s } from "./index-utils11.js";
import d from "./index-useEnhancedEffect2.js";
function e() {
  return typeof window > "u" ? "portrait" : window.screen && window.screen.orientation && window.screen.orientation.angle ? Math.abs(window.screen.orientation.angle) === 90 ? "landscape" : "portrait" : window.orientation && Math.abs(Number(window.orientation)) === 90 ? "landscape" : "portrait";
}
const f = (t, o) => {
  const [r, i] = a.useState(e);
  return d(() => {
    const n = () => {
      i(e());
    };
    return window.addEventListener("orientationchange", n), () => {
      window.removeEventListener("orientationchange", n);
    };
  }, []), s(t, ["hours", "minutes", "seconds"]) ? !1 : (o || r) === "landscape";
};
export {
  f as useIsLandscape
};
