import BrowserLogger from "alife-logger";

const environment = import.meta.env.DEV
  ? "local"
  : import.meta.env.MODE === "test"
  ? "daily"
  : import.meta.env.MODE === "production"
  ? "prod"
  : "local";

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
BrowserLogger.singleton({
  pid: "hworw@1db7bcc76381a07",
  uid: localStorage.getItem("uuidForEcs"),
  appType: "web",
  imgUrl: "https://arms-retcode.aliyuncs.com/r.png?",
  environment,
  sample: 100,
  release: import.meta.env.VITE_FE_VERSION,
  ignore: {
    ignoreApis: [
      function (str: string) {
        return !str.includes("/api/");
      },
    ],
  },
  // sendResource: true,
  // enableLinkTrace: true,
  // behavior: true,
});
