import{usePointerEvent as t}from"./use-pointer-event.js";import{detectBrowser as r}from"../../../utils/dist/esm/user-agent.js";import{isRefObject as e}from"../../../utils/dist/esm/assertion.js";import{isActiveElement as s}from"../../../utils/dist/esm/tabbable.js";import{contains as i,getOwnerDocument as o}from"../../../utils/dist/esm/dom.js";import{focus as m}from"../../../utils/dist/esm/focus.js";function n(n){var{ref:u,elements:a,enabled:f}=n,l=r("Safari");t((()=>o(u.current)),"pointerdown",(t=>{if(l&&f){var r=t.target,o=(null!=a?a:[u]).some((t=>{var s=e(t)?t.current:t;return i(s,r)}));!s(r)&&o&&(t.preventDefault(),m(r))}}))}export{n as useFocusOnPointerDown};
//# sourceMappingURL=use-focus-on-pointerdown.js.map
