"use client";
import { useState as c, useEffect as m } from "react";
function i(n) {
  const [r, d] = c(!1);
  return m(() => {
    const l = async (e) => new Promise((a, s) => {
      const o = new Image();
      o.onload = () => a(e), setTimeout(() => {
        a(e);
      }, 3e3), o.onerror = (t) => s(t), o.onabort = (t) => s(t), o.src = e;
    });
    Promise.allSettled(n.map(async (e) => l(e))).then(() => d(!0)).catch(
      (e) => console.error(`Failed to load images  ${e.toString()}`, e)
    );
  }, []), r;
}
export {
  i as default
};
//# sourceMappingURL=useAllImagesLoaded.mjs.map
