const globalScope = typeof window !== "undefined" ? window : globalThis;

export const Recorder = globalScope.Recorder;
export const EasyMDE = globalScope.EasyMDE;
export const marked = globalScope.marked;

export function assertIndexVendorGlobals() {
  const missing = [];
  if (!Recorder) missing.push("Recorder");
  if (!EasyMDE) missing.push("EasyMDE");
  if (!marked) missing.push("marked");

  if (missing.length > 0) {
    console.error(`Missing index vendor globals: ${missing.join(", ")}`);
  }
}