var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
const logFunction = {
  info: console.info,
  warn: console.warn,
  error: console.error
};
function getLogFunction(level, prefix) {
  if (process.env.NODE_ENV === "development") {
    if (prefix) {
      return logFunction[level].bind(window.console, prefix);
    } else {
      return logFunction[level].bind(window.console);
    }
  }
  return () => {
  };
}
class Log {
  constructor(prefix) {
    __publicField(this, "prefix", "");
    if (prefix) {
      this.prefix = `[${prefix}]`;
    }
  }
  get info() {
    return getLogFunction("info", this.prefix);
  }
  get warn() {
    return getLogFunction("warn", this.prefix);
  }
  get error() {
    return getLogFunction("error", this.prefix);
  }
}
const log = new Log();
export {
  Log,
  log
};
