import { reactive as g, openBlock as n, createElementBlock as r, createBaseVNode as s, Fragment as _, renderList as h, toDisplayString as i, hashText as u } from "./composables-Ci32s3jE.js";
const x = { class: "flex flex-col gap-2 p-2" }, k = { class: "p-2 flex flex-wrap gap-2 bg-light-100 dark-bg-dark-400 rounded cursor-pointer max-w-90 overflow-scroll" }, m = /* @__PURE__ */ s("div", { class: "font-bold" }, "Check file hash", -1), b = /* @__PURE__ */ s("div", { class: "flex-1" }, null, -1), w = { class: "p-0 text-xs bg-light-400 dark-bg-dark-800 select-none opacity-80" }, y = { class: "font-mono p-0 text-lg" }, F = {
  __name: "FileHash",
  setup(v) {
    const c = g({});
    function d(l) {
      var e;
      const o = (e = l == null ? void 0 : l.target) == null ? void 0 : e.files;
      for (const t of o) {
        console.log(t);
        const a = new FileReader();
        a.readAsDataURL(t), a.onloadend = async () => {
          const f = a.result, p = await u(f);
          c[p] = { name: t.name };
        };
      }
    }
    return (l, o) => (n(), r("div", x, [
      s("label", k, [
        m,
        b,
        s("input", {
          type: "file",
          onChange: o[0] || (o[0] = (e) => d(e))
        }, null, 32)
      ]),
      (n(!0), r(_, null, h(c, (e, t) => (n(), r("div", {
        class: "p-2 flex flex-col break-all bg-light-100 dark-bg-dark-400 shadow",
        key: t
      }, [
        s("div", w, i(e.name), 1),
        s("div", y, i(t), 1)
      ]))), 128))
    ]));
  }
};
export {
  F as default
};
//# sourceMappingURL=FileHash-kMMlUpom.js.map
