2019-06-23 00:07:28 +00:00
|
|
|
import { createStore } from 'easy-peasy';
|
2019-07-10 04:25:57 +00:00
|
|
|
import flashes, { FlashStore } from '@/state/flashes';
|
|
|
|
import user, { UserStore } from '@/state/user';
|
2019-11-04 01:37:06 +00:00
|
|
|
import permissions, { GloablPermissionsStore } from '@/state/permissions';
|
2019-12-16 02:05:44 +00:00
|
|
|
import settings, { SettingsStore } from '@/state/settings';
|
2019-06-22 23:45:51 +00:00
|
|
|
|
2019-07-10 04:25:57 +00:00
|
|
|
export interface ApplicationStore {
|
2019-11-04 01:37:06 +00:00
|
|
|
permissions: GloablPermissionsStore;
|
2019-07-10 04:25:57 +00:00
|
|
|
flashes: FlashStore;
|
|
|
|
user: UserStore;
|
2019-12-16 02:05:44 +00:00
|
|
|
settings: SettingsStore;
|
2019-07-10 04:25:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const state: ApplicationStore = {
|
2019-11-04 01:37:06 +00:00
|
|
|
permissions,
|
2019-06-23 00:07:28 +00:00
|
|
|
flashes,
|
|
|
|
user,
|
2019-12-16 02:05:44 +00:00
|
|
|
settings,
|
2019-06-22 23:45:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const store = createStore(state);
|