import { BaseLogger } from '@credo-ts/core';
import { consoleTransport, logger } from 'react-native-logs';
export class BifoldLogger extends BaseLogger {
  // eslint-disable-next-line @typescript-eslint/no-explicit-any

  _config = {
    levels: {
      test: 0,
      trace: 0,
      debug: 0,
      info: 1,
      warn: 2,
      error: 3,
      fatal: 4
    },
    severity: 'debug',
    async: true,
    dateFormat: 'time',
    printDate: false
  };
  constructor() {
    super();
    const transport = [consoleTransport];
    const config = {
      ...this._config,
      transport
    };
    this._log = logger.createLogger(config);
  }
  test(message, data) {
    var _this$_log;
    (_this$_log = this._log) === null || _this$_log === void 0 || _this$_log.test(message, data);
  }
  trace(message, data) {
    var _this$_log2;
    (_this$_log2 = this._log) === null || _this$_log2 === void 0 || _this$_log2.trace(message, data);
  }
  debug(message, data) {
    var _this$_log3;
    (_this$_log3 = this._log) === null || _this$_log3 === void 0 || _this$_log3.debug(message, data);
  }
  info(message, data) {
    var _this$_log4;
    (_this$_log4 = this._log) === null || _this$_log4 === void 0 || _this$_log4.info(message, data);
  }
  warn(message, data) {
    var _this$_log5;
    (_this$_log5 = this._log) === null || _this$_log5 === void 0 || _this$_log5.warn(message, data);
  }
  error(message, data) {
    var _this$_log6;
    (_this$_log6 = this._log) === null || _this$_log6 === void 0 || _this$_log6.error(message, data);
  }
  fatal(message, data) {
    var _this$_log7;
    (_this$_log7 = this._log) === null || _this$_log7 === void 0 || _this$_log7.fatal(message, data);
  }
  report(bifoldError) {
    var _this$_log8;
    (_this$_log8 = this._log) === null || _this$_log8 === void 0 || _this$_log8.info('No remote logging configured, report not sent for error:', bifoldError);
  }
}
//# sourceMappingURL=logger.js.map