import { useState as f, useEffect as n } from "react";
function l(t, r) {
  const [e, u] = f(!1);
  return n(() => {
    let o;
    return t && !e ? u(!0) : !t && e && (o = window.setTimeout(() => u(!1), r)), () => clearTimeout(o);
  }, [t, r, e]), e;
}
export {
  l as useDelayUnmount
};
