text: /*
   * Copyright (c) 2014, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   * TodoStore
   */
  
  var AppDispatcher = require('../dispatcher/AppDispatcher');
  var EventEmitter = require('events').EventEmitter;
  var TodoConstants = require('../constants/TodoConstants');
  var assign = require('object-assign');
  
  var CHANGE_EVENT = 'change';
  
  var _todos = [];
  
  var TodoStore = assign({}, EventEmitter.prototype, {
    getAll: function() {
      console.log(_todos);
      return _todos;
    },
    emitChange: function() {
      this.emit(CHANGE_EVENT);
    },
    addChangeListener: function(callback) {
      this.on(CHANGE_EVENT, callback);
    }
  });
  
  AppDispatcher.register(function(payload) {
    //console.log(payload);
    //_todos.push(payload);
    //TodoStore.emitChange();
  });
  
  module.exports = TodoStore;
  