import { logStore as f } from "./index-LogStore.js";
const S = (s, e, g, i, l) => {
  var a;
  const c = (d) => {
    const t = {
      ...d.getState()
    };
    t && t.Settings && delete t.Settings;
    let o = 2e3;
    for (const n in t)
      o - JSON.stringify(t[n]).length > 0 ? o -= JSON.stringify(t[n]).length : delete t[n];
    return t;
  };
  return f.putLog({
    data: [{
      info: g,
      error: e == null ? void 0 : e.name,
      message: (a = e == null ? void 0 : e.message) == null ? void 0 : a.slice(0, 100),
      href: window.location.href,
      host: window.location.host,
      pathname: window.location.pathname,
      state: i ? c(i) : void 0,
      source: l
    }]
  }, {
    type: s
  });
};
export {
  S as generateErrorBoundaryData
};
