import { useRef as v, useEffect as d } from "react";
function c(t, s) {
  const i = v([]), n = () => {
    i.current.push(setTimeout(() => {
      var e, r, u, o;
      !((e = t.current) === null || e === void 0) && e.input && ((r = t.current) === null || r === void 0 ? void 0 : r.input.getAttribute("type")) === "password" && (!((u = t.current) === null || u === void 0) && u.input.hasAttribute("value")) && ((o = t.current) === null || o === void 0 || o.input.removeAttribute("value"));
    }));
  };
  return d(() => (s && n(), () => i.current.forEach((e) => {
    e && clearTimeout(e);
  })), []), n;
}
export {
  c as default
};
