const MAX_ACTIVITY_ENTRIES = 200;
const GLOBAL_KEY = "__openMercatoInterceptorActivityEntries__";
const isDev = process.env.NODE_ENV === "development";
function getStore() {
  const existing = globalThis[GLOBAL_KEY];
  if (Array.isArray(existing)) return existing;
  const store = [];
  globalThis[GLOBAL_KEY] = store;
  return store;
}
function getInterceptorActivityEntries() {
  return getStore();
}
function clearInterceptorActivityEntries() {
  ;
  globalThis[GLOBAL_KEY] = [];
}
function logInterceptorActivity(entry) {
  if (!isDev) return;
  const store = getStore();
  store.push(entry);
  if (store.length > MAX_ACTIVITY_ENTRIES) {
    const trimmed = store.slice(-MAX_ACTIVITY_ENTRIES);
    globalThis[GLOBAL_KEY] = trimmed;
  }
}
export {
  clearInterceptorActivityEntries,
  getInterceptorActivityEntries,
  logInterceptorActivity
};
//# sourceMappingURL=interceptor-activity.js.map
