import Vue from 'vue';
import Vuex from 'vuex';
import * as ustate from './module/user/state';
import * as umutations from './module/user/mutations';
import admin from './module/user/action';
// 用户
import users from './module/user/users';
// 系统消息
import notice from './module/user/notice';
import msgList from './module/user/msgList';
import address from './module/user/address';

import todo from './module/statistics/todo';
import sellTotal from './module/statistics/sellTotal';
import shopInBill from './module/statistics/shopInBill';
import outBill from './module/statistics/outBill';
import getBill from './module/statistics/getBill';
import shopCashOut from './module/statistics/shopCashOut';

import dictIndex from './module/dev/dictIndex';
import dictData from './module/dev/dictData';
import menus from './module/dev/menus';
import role from './module/dev/role';

// 商品标签
import goodsTags from './module/system/goodsTags';
// 广告图
import banner from './module/system/banner';
// 首页图标
import indexModule from './module/system/indexModule';
import actTags from './module/system/actTags';
import config from './module/system/config';
import platformAct from './module/system/platformAct';
// 套装
import goodsSet from './module/system/goodsSet';
import goodsJoinAct from './module/system/goodsJoinAct';
import admins from './module/system/admin';

// 店铺信息
import shop from './module/shop/shop';
// 商品信息
import goods from './module/shop/goods';
import serviceContact from './module/shop/serviceContact';
// 商品规格
import goodsSpec from './module/shop/goodsSpec';
import afterSale from './module/shop/afterSale';
import getTransportInfo from './module/shop/getTransportInfo';
import shopNotice from './module/shop/shopNotice';
import goodsRate from './module/shop/goodsRate';

// 订单
import order from './module/trade/order';
// 订单详情
import orderDetail from './module/trade/orderDetail';
import sot from './module/trade/sot';
import coupon from './module/trade/coupon';
import cashOut from './module/trade/cashOut';
// 尊荣
import zrGoods from './module/zr/zrGoods';
import zrOrder from './module/zr/zrOrder';
import zrSot from './module/zr/zrSot';

// 团购
// 售后
import groupAfterSale from './module/group/groupAfterSale';
// 订单
import groupOrder from './module/group/groupOrder';
// 商品
import goodsConfig from './module/group/goodsConfig';
// 团表
import group from './module/group/group';
// 快递
import groupTransport from './module/group/groupTransport';
import salesTransport from './module/group/salesTransport';

// 聊天
// 聊天记录
import chatRecord from './module/message/chatRecord';
// 房间表
import room from './module/message/room';

Vue.use(Vuex);

export default new Vuex.Store({
  state: { ...ustate },
  mutations: { ...umutations },
  actions: {},
  modules: {
    users,
    admin,
    shop,
    address,
    goods,
    dictIndex,
    dictData,
    menus,
    role,
    goodsTags,
    banner,
    indexModule,
    goodsSpec,
    order,
    orderDetail,
    coupon,
    afterSale,
    getTransportInfo,
    serviceContact,
    sot,
    todo,
    sellTotal,
    actTags,
    config,
    platformAct,
    goodsJoinAct,
    goodsRate,
    shopInBill,
    outBill,
    admins,
    cashOut,
    zrGoods,
    zrOrder,
    zrSot,
    groupAfterSale,
    groupOrder,
    goodsConfig,
    group,
    groupTransport,
    salesTransport,
    notice,
    msgList,
    shopCashOut,
    getBill,
    shopNotice,
    goodsSet,
    chatRecord,
    room,
  },
});
