export default function baseReducer(state, action) {
    switch (action.type) {
        case 'CONFIG_LOADING':
            return Object.assign({}, state, { isLoading: true });
        case 'CONFIG_LOADED':
            let newState = Object.assign({}, state, { isLoading: false });
            Object.keys(action.payload).forEach((k) => {
                newState[k] = action.payload[k];
            });
            return newState;
        case 'SET_CONFIG':
            let newConfig = Object.assign({}, state);
            Object.keys(action.payload).forEach((k) => {
                newConfig[k] = action.payload[k];
            });
            return newConfig;
        default:
            return state;
    }
}
//# sourceMappingURL=base-reducer.js.map