plane/web/store/application/index.ts

35 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-12-11 10:18:59 +00:00
import { RootStore } from "../root.store";
2023-12-11 18:02:21 +00:00
import { AppConfigStore, IAppConfigStore } from "./app-config.store";
import { CommandPaletteStore, ICommandPaletteStore } from "./command-palette.store";
import { EventTrackerStore, IEventTrackerStore } from "./event-tracker.store";
import { InstanceStore, IInstanceStore } from "./instance.store";
import { RouterStore, IRouterStore } from "./router.store";
import { ThemeStore, IThemeStore } from "./theme.store";
2023-12-11 10:18:59 +00:00
2023-12-11 18:02:21 +00:00
export interface IAppRootStore {
config: IAppConfigStore;
commandPalette: ICommandPaletteStore;
eventTracker: IEventTrackerStore;
instance: IInstanceStore;
theme: IThemeStore;
router: IRouterStore;
}
export class AppRootStore implements IAppRootStore {
config: IAppConfigStore;
commandPalette: ICommandPaletteStore;
eventTracker: IEventTrackerStore;
instance: IInstanceStore;
theme: IThemeStore;
router: IRouterStore;
2023-12-11 09:25:05 +00:00
2023-12-11 10:18:59 +00:00
constructor(rootStore: RootStore) {
2023-12-11 14:45:07 +00:00
this.config = new AppConfigStore(rootStore);
2023-12-11 10:18:59 +00:00
this.commandPalette = new CommandPaletteStore(rootStore);
this.eventTracker = new EventTrackerStore(rootStore);
this.instance = new InstanceStore(rootStore);
this.theme = new ThemeStore(rootStore);
2023-12-11 14:45:07 +00:00
this.router = new RouterStore();
2023-12-11 09:25:05 +00:00
}
}