import _regeneratorRuntime from "@babel/runtime/regenerator";

var _marked = /*#__PURE__*/_regeneratorRuntime.mark(syncAppState),
    _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(watchApp);

import { takeEvery } from 'redux-saga/effects';
import { types } from '../modules/app';

function syncAppState(action) {
  return _regeneratorRuntime.wrap(function syncAppState$(_context) {
    while (1) {
      switch (_context.prev = _context.next) {
        case 0:
        case "end":
          return _context.stop();
      }
    }
  }, _marked);
}

export function watchApp() {
  return _regeneratorRuntime.wrap(function watchApp$(_context2) {
    while (1) {
      switch (_context2.prev = _context2.next) {
        case 0:
          _context2.next = 2;
          return takeEvery(types.SYNC_APP_STATE, syncAppState);

        case 2:
        case "end":
          return _context2.stop();
      }
    }
  }, _marked2);
}