2019-06-22 17:07:28 -07:00
|
|
|
import { createStore } from 'easy-peasy';
|
2019-07-09 21:25:57 -07:00
|
|
|
import flashes, { FlashStore } from '@/state/flashes';
|
|
|
|
import user, { UserStore } from '@/state/user';
|
2019-11-03 17:37:06 -08:00
|
|
|
import permissions, { GloablPermissionsStore } from '@/state/permissions';
|
2019-12-15 18:05:44 -08:00
|
|
|
import settings, { SettingsStore } from '@/state/settings';
|
2019-06-22 16:45:51 -07:00
|
|
|
|
2019-07-09 21:25:57 -07:00
|
|
|
export interface ApplicationStore {
|
2019-11-03 17:37:06 -08:00
|
|
|
permissions: GloablPermissionsStore;
|
2019-07-09 21:25:57 -07:00
|
|
|
flashes: FlashStore;
|
|
|
|
user: UserStore;
|
2019-12-15 18:05:44 -08:00
|
|
|
settings: SettingsStore;
|
2019-07-09 21:25:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
const state: ApplicationStore = {
|
2019-11-03 17:37:06 -08:00
|
|
|
permissions,
|
2019-06-22 17:07:28 -07:00
|
|
|
flashes,
|
|
|
|
user,
|
2019-12-15 18:05:44 -08:00
|
|
|
settings,
|
2019-06-22 16:45:51 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
export const store = createStore(state);
|