import { Map, fromJS, List } from 'immutable'

export function validateState(state = Map({
  username: { state: 'success', message: '' },
  password: { state: 'success', message: '' },
}), action) {
  switch (action.type) {
    case 'update':
      return state.sfs(fromJS(action.data))
    default:
      return state
  }
}

export function attributeForm(state = Map(), action) {
  switch (action.type) {
    case 'update':
      return state.sfs(fromJS(action.data))
    default:
      return state
  }
}
