import { $ as n } from "./mergeProps-Dsl8k3Ig.es.js";
import d, { useState as u, useMemo as p } from "react";
import { $ as f } from "./useFocusWithin-EFOG-Jn1.es.js";
const a = {
  border: 0,
  clip: "rect(0 0 0 0)",
  clipPath: "inset(50%)",
  height: "1px",
  margin: "-1px",
  overflow: "hidden",
  padding: 0,
  position: "absolute",
  width: "1px",
  whiteSpace: "nowrap"
};
function $(t = {}) {
  let { style: e, isFocusable: s } = t, [i, l] = u(!1), { focusWithinProps: o } = f({
    isDisabled: !s,
    onFocusWithinChange: (c) => l(c)
  }), r = p(() => i ? e : e ? {
    ...a,
    ...e
  } : a, [
    i
  ]);
  return {
    visuallyHiddenProps: {
      ...o,
      style: r
    }
  };
}
function y(t) {
  let { children: e, elementType: s = "div", isFocusable: i, style: l, ...o } = t, { visuallyHiddenProps: r } = $(t);
  return /* @__PURE__ */ d.createElement(s, n(o, r), e);
}
export {
  y as $,
  $ as a
};
//# sourceMappingURL=VisuallyHidden-BLRzeMsq.es.js.map
