import { <%- FileName %>ActionType } from './actions'
import <%- fileName %>State from './state'
import <%- fileName %>Types from './constants'
import type I<%- FileName %>State from './types'

function <%- fileName %>Reducer (state: I<%- FileName %>State = <%- fileName %>State, action: <%- FileName %>ActionType): I<%- FileName %>State {
  switch (action.type) {
    case <%- fileName %>Types.GET_<%- contantFileName %>: {
      Object.assign(state, {
        ...action.payload,
      })
      break
    }
  }
  return { ...state }
}

export default <%- fileName %>Reducer
