import { a as s } from "./FocusScope-CqEZq7sr.es.js";
import { d as u } from "./mergeProps-Dsl8k3Ig.es.js";
import { useState as c } from "react";
function f(e, t) {
  let a = t?.isDisabled, [d, i] = c(!1);
  return u(() => {
    if (e?.current && !a) {
      let r = () => {
        if (e.current) {
          let l = s(e.current, {
            tabbable: !0
          });
          i(!!l.nextNode());
        }
      };
      r();
      let b = new MutationObserver(r);
      return b.observe(e.current, {
        subtree: !0,
        childList: !0,
        attributes: !0,
        attributeFilter: [
          "tabIndex",
          "disabled"
        ]
      }), () => {
        b.disconnect();
      };
    }
  }), a ? !1 : d;
}
export {
  f as $
};
//# sourceMappingURL=useHasTabbableChild-DXq72IE3.es.js.map
