const GLOBAL_KEY = "__openMercatoSyncSubscribers__";
let _syncEntries = null;
function readGlobal() {
  try {
    const value = globalThis[GLOBAL_KEY];
    return Array.isArray(value) ? value : null;
  } catch {
    return null;
  }
}
function writeGlobal(entries) {
  try {
    ;
    globalThis[GLOBAL_KEY] = entries;
  } catch {
  }
}
function registerSyncSubscribers(entries) {
  _syncEntries = entries;
  writeGlobal(entries);
}
function getAllSyncSubscribers() {
  const globalEntries = readGlobal();
  if (globalEntries) return globalEntries;
  if (!_syncEntries) return [];
  return _syncEntries;
}
export {
  getAllSyncSubscribers,
  registerSyncSubscribers
};
//# sourceMappingURL=sync-subscriber-store.js.map
