/* esm.sh - @assistant-ui/core@0.3.31/dist/react/runtimes/assistant-transport/useLatestRef */
import{c as n}from"../../../../../../../tap@0.9.24/X-ZHJlYWN0QDE5LjMuMQ/es2022/react-shim/compiler-runtime.mjs";import{useInsertionEffect as s,useRef as c}from"../../../../../../../tap@0.9.24/X-ZHJlYWN0QDE5LjMuMQ/es2022/react-shim.mjs";function p(e){let t=n(3),o=c(e),r,f;return t[0]!==e?(r=()=>{o.current=e},f=[e],t[0]=e,t[1]=r,t[2]=f):(r=t[1],f=t[2]),s(r,f),o}export{p as useLatestRef};
//# sourceMappingURL=useLatestRef.mjs.map