/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */ import { ActionObject , BotState } from '../types' ; import { AT } from '../types/ActionTypes' ; import { Reducer } from 'redux' ; import * as CLM from '@conversationlearner/models' ; import produce from 'immer' ; const initialState = { botInfo : null , browserId : CLM . ModelUtils . generateGUID ( ) } ; const botReducer = produce ( ( state , action ) => { switch ( action . type ) { case AT . FETCH_BOTINFO_FULFILLED : state . botInfo = action . botInfo ; state . browserId = action . browserId ; return ; default : return ; } } , initialState ) ; export default botReducer ;