import { <%- FileName %>PageActionType } from './actions'
import <%- fileName %>PageState from './state'
import <%- fileName %>PageTypes from './constants'
import type I<%- FileName %>PageState from './types'

function <%- fileName %>PageReducer (state: I<%- FileName %>PageState = <%- fileName %>PageState, action: <%- FileName %>PageActionType): I<%- FileName %>PageState {
  switch (action.type) {
    case <%- fileName %>PageTypes.GET_<%- contantFileName %>: {
      Object.assign(state, {
        ...action.payload,
      })
      break
    }
  }
  return { ...state }
}

export default <%- fileName %>PageReducer
