2026-01-10 20:39:17 +01:00
|
|
|
/**
|
|
|
|
|
* Salon OS App
|
|
|
|
|
*
|
|
|
|
|
* Main application class that orchestrates all UI controllers
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { SidebarController } from './modules/sidebar';
|
|
|
|
|
import { DrawerController } from './modules/drawers';
|
|
|
|
|
import { ThemeController } from './modules/theme';
|
|
|
|
|
import { SearchController } from './modules/search';
|
|
|
|
|
import { LockScreenController } from './modules/lockscreen';
|
2026-01-11 21:42:24 +01:00
|
|
|
import { CashController } from './modules/cash';
|
2026-01-10 20:39:17 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Main application class
|
|
|
|
|
*/
|
|
|
|
|
export class App {
|
|
|
|
|
readonly sidebar: SidebarController;
|
|
|
|
|
readonly drawers: DrawerController;
|
|
|
|
|
readonly theme: ThemeController;
|
|
|
|
|
readonly search: SearchController;
|
|
|
|
|
readonly lockScreen: LockScreenController;
|
2026-01-11 21:42:24 +01:00
|
|
|
readonly cash: CashController;
|
2026-01-10 20:39:17 +01:00
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
// Initialize controllers
|
|
|
|
|
this.sidebar = new SidebarController();
|
|
|
|
|
this.drawers = new DrawerController();
|
|
|
|
|
this.theme = new ThemeController();
|
|
|
|
|
this.search = new SearchController();
|
|
|
|
|
this.lockScreen = new LockScreenController(this.drawers);
|
2026-01-11 21:42:24 +01:00
|
|
|
this.cash = new CashController();
|
2026-01-10 20:39:17 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Global app instance
|
|
|
|
|
*/
|
|
|
|
|
let app: App;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialize the application
|
|
|
|
|
*/
|
|
|
|
|
function init(): void {
|
|
|
|
|
app = new App();
|
|
|
|
|
|
|
|
|
|
// Expose to window for debugging
|
|
|
|
|
if (typeof window !== 'undefined') {
|
|
|
|
|
(window as unknown as { app: App }).app = app;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Wait for DOM ready
|
|
|
|
|
if (document.readyState === 'loading') {
|
|
|
|
|
document.addEventListener('DOMContentLoaded', init);
|
|
|
|
|
} else {
|
|
|
|
|
init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { app };
|
|
|
|
|
export default App;
|