ee21a9c908f9373adfed5b8b3f8a0167104ffbc6
[ccsdk/features.git] / sdnr / wt / odlux / apps / demoApp / src / handlers / demoAppRootHandler.ts
1
2 import { combineActionHandler } from '../../../../framework/src/flux/middleware';
3
4 import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
5
6 import { listAuthorsHandler, IListAuthors } from './listAuthorsHandler';
7 import { editAuthorHandler, IEditAuthor } from './editAuthorHandler';
8
9 export interface IDemoAppStoreState {
10   listAuthors: IListAuthors;
11   editAuthor: IEditAuthor;
12 }
13
14 declare module '../../../../framework/src/store/applicationStore' {
15   interface IApplicationStoreState {
16     demoApp: IDemoAppStoreState
17   }
18 }
19
20 const actionHandlers = {
21   listAuthors: listAuthorsHandler,
22   editAuthor: editAuthorHandler,
23 };
24
25 export const demoAppRootHandler = combineActionHandler <IDemoAppStoreState>(actionHandlers);
26 export default demoAppRootHandler;