import { navigations } from 'app/navigations'
import {
    SET_USER_NAVIGATION,
    SET_USER_NAVIGATION_LOGIN,
} from '../actions/NavigationAction'

const initialState = [...navigations]

const NavigationReducer = function (state = initialState, action) {
    switch (action.type) {
        case SET_USER_NAVIGATION_LOGIN: {
            console.log('action', action)
            return []
        }

        case SET_USER_NAVIGATION: {
            return [...action.payload]
        }
        default: {
            return [...state]
        }
    }
}

export default NavigationReducer
