import { actions, reducer, state, saga } from './state'
import components from './components'

const filters = {}

const selectors = {}

const middleware = store => next => action => {
  const { alert, ...newAction } = action
  if (alert) {
    console.log('would add new alert:', alert, newAction)
    store.dispatch(actions.alertAdd(alert))
  }
  return next(newAction)
}

export default { actions, components, filters, selectors, reducer, state, saga, middleware }
