Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _idbKeyval = require("idb-keyval");
var IndexedDBStorageController;
if (typeof window !== 'undefined' && window.indexedDB) {
  try {
    var ParseStore = (0, _idbKeyval.createStore)('parseDB', 'parseStore');
    IndexedDBStorageController = {
      async: 1,
      getItemAsync: function (path) {
        return (0, _idbKeyval.get)(path, ParseStore);
      },
      setItemAsync: function (path, value) {
        return (0, _idbKeyval.set)(path, value, ParseStore);
      },
      removeItemAsync: function (path) {
        return (0, _idbKeyval.del)(path, ParseStore);
      },
      getAllKeysAsync: function () {
        return (0, _idbKeyval.keys)(ParseStore);
      },
      clear: function () {
        return (0, _idbKeyval.clear)(ParseStore);
      }
    };
  } catch (_) {
    IndexedDBStorageController = undefined;
  }
} else {
  IndexedDBStorageController = undefined;
}
module.exports = IndexedDBStorageController;
var _default = exports.default = IndexedDBStorageController;