text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
      value: true
  });
  
  var _idbKeyval = require('idb-keyval');
  
  function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  
  var reduxStorageEngineIndexedDB = function reduxStorageEngineIndexedDB(store) {
      return {
          load: function () {
              var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
                  return regeneratorRuntime.wrap(function _callee$(_context) {
                      while (1) {
                          switch (_context.prev = _context.next) {
                              case 0:
                                  _context.next = 2;
                                  return (0, _idbKeyval.get)(store);
  
                              case 2:
                                  return _context.abrupt('return', _context.sent);
  
                              case 3:
                              case 'end':
                                  return _context.stop();
                          }
                      }
                  }, _callee, undefined);
              }));
  
              return function load() {
                  return _ref.apply(this, arguments);
              };
          }(),
  
          save: function () {
              var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(states) {
                  return regeneratorRuntime.wrap(function _callee2$(_context2) {
                      while (1) {
                          switch (_context2.prev = _context2.next) {
                              case 0:
                                  _context2.next = 2;
                                  return (0, _idbKeyval.set)(store, states);
  
                              case 2:
                                  return _context2.abrupt('return', _context2.sent);
  
                              case 3:
                              case 'end':
                                  return _context2.stop();
                          }
                      }
                  }, _callee2, undefined);
              }));
  
              return function save(_x) {
                  return _ref2.apply(this, arguments);
              };
          }()
      };
  };
  
  exports['default'] = reduxStorageEngineIndexedDB;