"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.Firebase = void 0;

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _indexModule = _interopRequireDefault(require("./../../../../index.module.d"));

var _lodash = _interopRequireDefault(require("lodash"));

var _app = _interopRequireDefault(require("firebase/app"));

var _firestore = _interopRequireDefault(require("firebase/firestore"));

var Firebase =
/**
 *
 * @param {{}} config Configuration Firebase;
 *
 *
 */
function Firebase(config) {
  (0, _classCallCheck2["default"])(this, Firebase);
  (0, _defineProperty2["default"])(this, "app", null);
  (0, _defineProperty2["default"])(this, "firestore", new _firestore["default"].getFirestore(this.app));

  /** Extend Constructor Config **/
  this.config = _lodash["default"].merge(_indexModule["default"].config.FirebaseConfig, config);
  /**
   *
   * @type {firebase.app.App}
   */

  this.app = _app["default"].initializeApp(this.config);
}
/**
 *
 * @param {firebase.firestore} callback
 * @return {Promise<firebase.firestore>}
 */
;

exports.Firebase = Firebase;
var _default = Firebase;
exports["default"] = _default;
//# sourceMappingURL=index.js.map