import { a as s } from "./FocusScope-DI1zU4s2.es.js";
import { b as u } from "./mergeProps-B-cqsBhL.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-BKDz3bMI.es.js.map
