/**
 * Combine all reducers in this file and export the combined reducers.
 * If we were to do this in store.js, reducers wouldn't be hot reloadable.
 */
import { combineReducers } from 'redux-immutable';

import home from 'containers/Home/redux';

import customerList from 'containers/Customers/redux';
import customerDetail from 'containers/CustomerDetail/redux';

import incomeList from 'containers/Income/redux';
import invoiceDetail from 'containers/InvoiceDetail/redux';
import incomeDetail from 'containers/IncomeDetail/redux';

import expenseList from 'containers/Expenses/redux';
import expenseDetail from 'containers/ExpenseDetail/redux';

import paymentList from 'containers/PaymentList/redux';
import paymentDetail from 'containers/PaymentDetail/redux';
import paymentCategoryList from 'containers/PaymentCategory/redux';
import paymentCategoryDetail from 'containers/PaymentCategoryDetail/redux';

import taxReport from 'containers/TaxReport/redux';
import cashflowReport from 'containers/CashflowReport/redux';
import paymentReport from 'containers/PaymentReport/redux';
import customerReport from 'containers/CustomerReport/redux';
import summaryReport from 'containers/SummaryReport/redux';
import dphReport from 'containers/DphReport/redux';
import incomeReport from 'containers/IncomeReport/redux';
import expenseReport from 'containers/ExpenseReport/redux';

import settings from 'containers/Settings/redux';
import settingsLocale from 'containers/Settings/Local/redux';
import settingsTax from 'containers/Settings/Tax/redux';
import settingsCompany from 'containers/Settings/Company/redux';
import settingsCustomization from 'containers/Settings/Customization/redux';
import settingsPayment from 'containers/Settings/Payment/redux';
import settingsLinkedAccounts from 'containers/Settings/LinkedAccounts/redux';
import initSettings from 'containers/InitSettings/redux';

import params from 'containers/Params/redux';

import { reducer as attachment } from 'lib/attachment';
import { reducer as notification } from 'lib/notification';
import { reducer as tag } from 'lib/tag';



export default function createReducer(reducers) {
  return combineReducers({

  	home,

  	customerList,
  	customerDetail,

  	incomeList,
  	invoiceDetail,
    incomeDetail,

  	expenseList,
  	expenseDetail,

    paymentList,
    paymentDetail,
    paymentCategoryList,
    paymentCategoryDetail,

    taxReport,
    cashflowReport,
    paymentReport,
    customerReport,
    summaryReport,
    dphReport,

    incomeReport,
    expenseReport,

    initSettings,
    settings,
    settingsLocale,
    settingsTax,
    settingsCompany,
    settingsCustomization,
    settingsPayment,
    settingsLinkedAccounts,

    attachment,
    notification,
    tag,

    params,
    
    ...reducers
  });
}

