import {
    combineReducers,
    createStore,
    applyMiddleware,
    compose
} from 'redux';
import thunk from "redux-thunk";
import historyTemplates from './reducers/historyTemplates';
import tabTemplate from './reducers/tabTemplate';
import checkBox from './reducers/checkBox';
import patInfo from './reducers/patInfo';
import print from './reducers/print';
import preview from './reducers/preview';
import otherHistory from './reducers/otherHistory';
import mixCheckBox from './reducers/mixCheckBox';
import diagnosticList from './reducers/diagnosticList';
import inspect from './reducers/inspect';
import assistCheck from './reducers/assistCheck';
import copyRight from './reducers/copyRight';
import homePage from './reducers/homePage';
import mainSuit from './reducers/mainSuit';
import diagnosticSearch from './reducers/diagnosticSearch'
import typeConfig from './reducers/typeConfig';
import fillInfo from './reducers/fillInfo';
import pushMessage from './reducers/pushMessage';
import submit from './reducers/submit';
import checkBody from './reducers/checkBody';
import getInfoByUuid from './reducers/getInfoByUuid';
import treat from './reducers/treat';
import currentIll from './reducers/currentIll';
import assessResult from './reducers/assessResult';
import assessResultHis from './reducers/assessResultHis';


const composeEnhancers =
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;

const enhancer = composeEnhancers(
    applyMiddleware(thunk)
);

const rootReducer = combineReducers({
    tabTemplate,
    checkBox,
    patInfo,
    print,
    preview,
    otherHistory,
    mixCheckBox,
    diagnosticList,
    historyTemplates,
    inspect,
    copyRight,
    homePage,
    mainSuit,
    diagnosticSearch,
    typeConfig,
    fillInfo,
    pushMessage,
    submit,
    treat,
    assistCheck,
    checkBody,
    getInfoByUuid,
	checkBody,
    currentIll,
  assessResult,
  assessResultHis
});

export default createStore(rootReducer, enhancer);