cloud-ide-layout 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +466 -13
  2. package/esm2022/lib/cloud-ide-layout.routes.mjs +24 -10
  3. package/esm2022/lib/layout/console/console-wrapper/console-wrapper.component.mjs +6 -6
  4. package/esm2022/lib/layout/console/console.service.mjs +28 -0
  5. package/esm2022/lib/layout/footer/footer-wrapper/footer-wrapper.component.mjs +16 -8
  6. package/esm2022/lib/layout/footer/footer.service.mjs +28 -0
  7. package/esm2022/lib/layout/header/header-wrapper/header-wrapper.component.mjs +69 -18
  8. package/esm2022/lib/layout/header/header.service.mjs +17 -6
  9. package/esm2022/lib/layout/home/home-wrapper/home-wrapper.component.mjs +194 -7
  10. package/esm2022/lib/layout/layout/layout-wrapper/layout-wrapper.component.mjs +18 -9
  11. package/esm2022/lib/layout/request/request-wrapper/request-wrapper.component.mjs +54 -6
  12. package/esm2022/lib/layout/request/request.service.mjs +235 -0
  13. package/esm2022/lib/layout/request/tab-content/tab-content.component.mjs +84 -0
  14. package/esm2022/lib/layout/shared/shared-wrapper/shared-wrapper.component.mjs +32 -20
  15. package/esm2022/lib/layout/shared/shared.service.mjs +490 -14
  16. package/esm2022/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.mjs +480 -15
  17. package/esm2022/lib/layout/sidebar/sidebar.service.mjs +20 -7
  18. package/esm2022/lib/layout/sidedrawer/cide-lyt-drawer-base.class.mjs +40 -0
  19. package/esm2022/lib/layout/sidedrawer/drawer-theme/drawer-theme.component.mjs +296 -0
  20. package/esm2022/lib/layout/sidedrawer/sidedrawer-notes/sidedrawer-notes.component.mjs +175 -0
  21. package/esm2022/lib/layout/sidedrawer/sidedrawer-notes/sidedrawer-notes.service.mjs +51 -0
  22. package/esm2022/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.mjs +254 -9
  23. package/esm2022/lib/layout/sidedrawer/sidedrawer.service.mjs +70 -0
  24. package/esm2022/lib/services/app-state/app-state-helper.service.mjs +222 -0
  25. package/esm2022/lib/services/app-state/app-state.service.mjs +256 -0
  26. package/esm2022/lib/services/app-state/index.mjs +3 -0
  27. package/esm2022/lib/services/cache-manager/cache-manager.service.mjs +112 -0
  28. package/esm2022/lib/services/file-manager/file-manager.service.mjs +7 -7
  29. package/esm2022/lib/services/tab-state.service.mjs +128 -0
  30. package/esm2022/lib/services/theme/theme.service.mjs +151 -0
  31. package/esm2022/lib/services/user-status/user-status.service.mjs +135 -0
  32. package/esm2022/lib/utils/custom-route-reuse-strategy.mjs +61 -0
  33. package/esm2022/lib/utils/index.mjs +2 -0
  34. package/esm2022/public-api.mjs +7 -1
  35. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DqL3A73V.mjs +2914 -0
  36. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DqL3A73V.mjs.map +1 -0
  37. package/fesm2022/cloud-ide-layout-drawer-theme.component-xd8IG3WP.mjs +443 -0
  38. package/fesm2022/cloud-ide-layout-drawer-theme.component-xd8IG3WP.mjs.map +1 -0
  39. package/fesm2022/cloud-ide-layout-home-wrapper.component-DEdsEiaq.mjs +197 -0
  40. package/fesm2022/cloud-ide-layout-home-wrapper.component-DEdsEiaq.mjs.map +1 -0
  41. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-ds12wZbh.mjs +260 -0
  42. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-ds12wZbh.mjs.map +1 -0
  43. package/fesm2022/cloud-ide-layout.mjs +1 -261
  44. package/fesm2022/cloud-ide-layout.mjs.map +1 -1
  45. package/lib/cloud-ide-layout.routes.d.ts +1 -0
  46. package/lib/layout/console/console-wrapper/console-wrapper.component.d.ts +3 -3
  47. package/lib/layout/console/console.service.d.ts +9 -0
  48. package/lib/layout/footer/footer-wrapper/footer-wrapper.component.d.ts +7 -3
  49. package/lib/layout/footer/footer.service.d.ts +9 -0
  50. package/lib/layout/header/header-wrapper/header-wrapper.component.d.ts +17 -9
  51. package/lib/layout/header/header.service.d.ts +4 -3
  52. package/lib/layout/home/home-wrapper/home-wrapper.component.d.ts +90 -1
  53. package/lib/layout/request/request-wrapper/request-wrapper.component.d.ts +10 -1
  54. package/lib/layout/request/request.service.d.ts +60 -0
  55. package/lib/layout/request/tab-content/tab-content.component.d.ts +19 -0
  56. package/lib/layout/shared/shared-wrapper/shared-wrapper.component.d.ts +4 -5
  57. package/lib/layout/shared/shared.service.d.ts +104 -6
  58. package/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.d.ts +135 -6
  59. package/lib/layout/sidebar/sidebar.service.d.ts +3 -2
  60. package/lib/layout/sidedrawer/cide-lyt-drawer-base.class.d.ts +16 -0
  61. package/lib/layout/sidedrawer/drawer-theme/drawer-theme.component.d.ts +71 -0
  62. package/lib/layout/sidedrawer/sidedrawer-notes/sidedrawer-notes.component.d.ts +48 -0
  63. package/lib/layout/sidedrawer/sidedrawer-notes/sidedrawer-notes.service.d.ts +13 -0
  64. package/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.d.ts +28 -3
  65. package/lib/layout/sidedrawer/sidedrawer.service.d.ts +30 -0
  66. package/lib/services/app-state/app-state-helper.service.d.ts +150 -0
  67. package/lib/services/app-state/app-state.service.d.ts +85 -0
  68. package/lib/services/app-state/index.d.ts +3 -0
  69. package/lib/services/cache-manager/cache-manager.service.d.ts +64 -0
  70. package/lib/services/file-manager/file-manager.service.d.ts +0 -2
  71. package/lib/services/tab-state.service.d.ts +79 -0
  72. package/lib/services/theme/theme.service.d.ts +71 -0
  73. package/lib/services/user-status/user-status.service.d.ts +57 -0
  74. package/lib/utils/custom-route-reuse-strategy.d.ts +15 -0
  75. package/lib/utils/index.d.ts +1 -0
  76. package/package.json +2 -2
  77. package/public-api.d.ts +4 -0
  78. package/src/lib/assets/css/cide-lyt-style.scss +182 -0
  79. package/src/lib/assets/css/cide-lyt-variable.scss +119 -0
  80. package/fesm2022/cloud-ide-layout-home-wrapper.component-BV7ptL0Y.mjs +0 -14
  81. package/fesm2022/cloud-ide-layout-home-wrapper.component-BV7ptL0Y.mjs.map +0 -1
@@ -0,0 +1,2914 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, inject, signal, computed, effect, Component, ElementRef, HostListener, ViewContainerRef, ViewChild, ViewChildren } from '@angular/core';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import { cidePath, hostManagerRoutesUrl, coreRoutesUrl, designConfigRoutesUrl } from 'cloud-ide-lms-model';
5
+ import { throwError, of, BehaviorSubject, interval, take as take$1 } from 'rxjs';
6
+ import { map, filter, tap, catchError, shareReplay, take, distinctUntilChanged } from 'rxjs/operators';
7
+ import * as i2$1 from '@angular/router';
8
+ import { Router, NavigationEnd, RouteReuseStrategy, RouterModule } from '@angular/router';
9
+ import { Title } from '@angular/platform-browser';
10
+ import { CideElementsService, CideInputComponent, CideIconComponent, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';
11
+ import * as i2 from '@angular/common';
12
+ import { CommonModule, NgClass, NgFor, NgIf } from '@angular/common';
13
+ import { trigger, state, style, transition, animate } from '@angular/animations';
14
+ import { merge } from 'lodash';
15
+
16
+ class CloudIdeLayoutService {
17
+ constructor() { }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeLayoutService, providedIn: 'root' }); }
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeLayoutService, decorators: [{
22
+ type: Injectable,
23
+ args: [{
24
+ providedIn: 'root'
25
+ }]
26
+ }], ctorParameters: () => [] });
27
+
28
+ class CideLytHeaderService {
29
+ constructor() {
30
+ this.headerVisible = false;
31
+ }
32
+ // Hide Header
33
+ hideHeader() {
34
+ this.headerVisible = false;
35
+ document.querySelector(`#cide-lyt-header-wrapper`)?.classList.add('cide-lyt-header-wrapper-hide');
36
+ document.querySelector(`body`)?.classList.remove('cide-lyt-header-exist');
37
+ }
38
+ // Show Header
39
+ showHeader() {
40
+ this.headerVisible = true;
41
+ document.querySelector(`#cide-lyt-header-wrapper`)?.classList.remove('cide-lyt-header-wrapper-hide');
42
+ document.querySelector(`body`)?.classList.add('cide-lyt-header-exist');
43
+ }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytHeaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytHeaderService, providedIn: 'root' }); }
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytHeaderService, decorators: [{
48
+ type: Injectable,
49
+ args: [{
50
+ providedIn: 'root'
51
+ }]
52
+ }], ctorParameters: () => [] });
53
+
54
+ class CideLytFileManagerService {
55
+ constructor() {
56
+ this.http = inject(HttpClient);
57
+ }
58
+ getFileDetails(body) {
59
+ return this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.getFileDetails]), body);
60
+ }
61
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFileManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
62
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFileManagerService, providedIn: 'root' }); }
63
+ }
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFileManagerService, decorators: [{
65
+ type: Injectable,
66
+ args: [{
67
+ providedIn: 'root'
68
+ }]
69
+ }] });
70
+
71
+ class CideLytSidebarService {
72
+ constructor() {
73
+ this.sidebarMenueVisible = false;
74
+ this.http = inject(HttpClient);
75
+ }
76
+ // method to get sidebar menues
77
+ getSidebarMenues(body) {
78
+ return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.getSidebarMenues]), body);
79
+ }
80
+ // Hide Sidebar
81
+ hideSidebar() {
82
+ this.sidebarMenueVisible = false;
83
+ document.querySelector(`#cide-lyt-sidebar-page`)?.classList.add('cide-lyt-sidebar-page-hide');
84
+ document.querySelector(`body`)?.classList.remove('cide-lyt-sidebar-exist');
85
+ }
86
+ // Show Sidebar
87
+ showSidebar() {
88
+ this.sidebarMenueVisible = true;
89
+ document.querySelector(`#cide-lyt-sidebar-page`)?.classList.remove('cide-lyt-sidebar-page-hide');
90
+ document.querySelector(`body`)?.classList.add('cide-lyt-sidebar-exist');
91
+ }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
93
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidebarService, providedIn: 'root' }); }
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidebarService, decorators: [{
96
+ type: Injectable,
97
+ args: [{
98
+ providedIn: 'root'
99
+ }]
100
+ }] });
101
+
102
+ class CideLytFooterService {
103
+ constructor() {
104
+ this.footerVisible = false;
105
+ }
106
+ // Hide Footer
107
+ hideFooter() {
108
+ this.footerVisible = false;
109
+ document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.add('cide-lyt-footer-console-wrapper-hide');
110
+ document.querySelector(`body`)?.classList.remove('cide-lyt-footer-exist');
111
+ }
112
+ // Show Footer
113
+ showFooter() {
114
+ this.footerVisible = true;
115
+ document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.remove('cide-lyt-footer-console-wrapper-hide');
116
+ document.querySelector(`body`)?.classList.add('cide-lyt-footer-exist');
117
+ }
118
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFooterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
119
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFooterService, providedIn: 'root' }); }
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFooterService, decorators: [{
122
+ type: Injectable,
123
+ args: [{
124
+ providedIn: 'root'
125
+ }]
126
+ }], ctorParameters: () => [] });
127
+
128
+ class CideLytConsoleService {
129
+ constructor() {
130
+ this.headerVisible = false;
131
+ }
132
+ // Hide Console
133
+ hideConsole() {
134
+ this.headerVisible = false;
135
+ document.querySelector(`#cide-lyt-console-wrapper`)?.classList.add('cide-lyt-console-wrapper-hide');
136
+ document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');
137
+ }
138
+ // Show Console
139
+ showConsole() {
140
+ this.headerVisible = true;
141
+ document.querySelector(`#cide-lyt-console-wrapper`)?.classList.remove('cide-lyt-console-wrapper-hide');
142
+ document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');
143
+ }
144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytConsoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
145
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytConsoleService, providedIn: 'root' }); }
146
+ }
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytConsoleService, decorators: [{
148
+ type: Injectable,
149
+ args: [{
150
+ providedIn: 'root'
151
+ }]
152
+ }], ctorParameters: () => [] });
153
+
154
+ class CideLytSidedrawerService {
155
+ constructor() {
156
+ this.sidedrawerVisible = false;
157
+ // Modern Angular signals for reactive state management
158
+ this.drawerItemsSignal = signal([]);
159
+ this.drawerItems = this.drawerItemsSignal.asReadonly();
160
+ this.notesVisibleSignal = signal(false);
161
+ this.notesVisible = this.notesVisibleSignal.asReadonly();
162
+ this.activeComponentSignal = signal(null);
163
+ this.activeComponent = this.activeComponentSignal.asReadonly();
164
+ this._pageId = null;
165
+ this._themeId = null;
166
+ }
167
+ setContext(pageId, themeId) {
168
+ this._pageId = pageId;
169
+ this._themeId = themeId;
170
+ }
171
+ get pageId() {
172
+ return this._pageId;
173
+ }
174
+ get themeId() {
175
+ return this._themeId;
176
+ }
177
+ // Hide Sidedrawer
178
+ hideSidedrawer() {
179
+ this.sidedrawerVisible = false;
180
+ document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.add('cide-lyt-sidedrawer-wrapper-hide');
181
+ document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');
182
+ }
183
+ // Show Sidedrawer
184
+ showSidedrawer() {
185
+ this.sidedrawerVisible = true;
186
+ document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.remove('cide-lyt-sidedrawer-wrapper-hide');
187
+ document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');
188
+ }
189
+ // Method to update drawer items from layout data
190
+ updateDrawerItems(layout) {
191
+ if (layout?.sytm_layout_drawer && layout.sytm_layout_drawer.length > 0) {
192
+ const items = layout.sytm_layout_drawer
193
+ .filter((item) => item.syth_status && item?.core_system_config?.syco_isactive) // Only show active items
194
+ .map(item => ({
195
+ status: item.syth_status,
196
+ configFor: item.syth_config_syco_for,
197
+ title: item.core_system_config?.syco_title,
198
+ icon: item.core_system_config?.syco_configuration.syco_icon,
199
+ description: item.core_system_config?.syco_desc || "",
200
+ isActive: item.core_system_config?.syco_isactive || false
201
+ }));
202
+ this.drawerItemsSignal.set(items);
203
+ }
204
+ else {
205
+ this.drawerItemsSignal.set([]); // Clear items if no drawer data
206
+ }
207
+ }
208
+ // Set the active component to display in the side drawer
209
+ setActiveComponent(configFor) {
210
+ this.activeComponentSignal.set(configFor);
211
+ }
212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidedrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
213
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidedrawerService, providedIn: 'root' }); }
214
+ }
215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidedrawerService, decorators: [{
216
+ type: Injectable,
217
+ args: [{
218
+ providedIn: 'root'
219
+ }]
220
+ }] });
221
+
222
+ class AppStateService {
223
+ constructor() {
224
+ // Private signal for current user
225
+ this.currentUserSignal = signal(null);
226
+ // Private signal for active module
227
+ this.activeModuleSignal = signal(null);
228
+ // Private signal for active entity
229
+ this.activeEntitySignal = signal(null);
230
+ // Public computed signal for current user, for other services to get the user value
231
+ this.currentUser = computed(() => this.currentUserSignal());
232
+ // Public computed signal for active module
233
+ this.activeModule = computed(() => this.activeModuleSignal());
234
+ // Public computed signal for active entity
235
+ this.activeEntity = computed(() => this.activeEntitySignal());
236
+ // Computed signals for derived state
237
+ this.isAuthenticated = computed(() => !!this.currentUserSignal());
238
+ this.userInfo = computed(() => {
239
+ const user = this.currentUserSignal();
240
+ if (!user)
241
+ return null;
242
+ return {
243
+ id: user._id,
244
+ name: user.user_fullname || `${user.user_firstname} ${user.user_lastname}`,
245
+ email: user.user_emailid,
246
+ role: user.user_id_role
247
+ };
248
+ });
249
+ // Computed signal for active module info
250
+ this.activeModuleInfo = computed(() => {
251
+ const module = this.activeModuleSignal();
252
+ if (!module)
253
+ return null;
254
+ return {
255
+ id: module._id,
256
+ title: module.syme_title,
257
+ icon: module.syme_icon,
258
+ path: module.syme_path,
259
+ type: module.syme_type
260
+ };
261
+ });
262
+ // Load initial state from localStorage
263
+ this.loadFromLocalStorage();
264
+ // Save to localStorage whenever state changes
265
+ effect(() => {
266
+ const currentUser = this.currentUserSignal();
267
+ const activeModule = this.activeModuleSignal();
268
+ const activeEntity = this.activeEntitySignal();
269
+ this.saveToLocalStorage({
270
+ user: currentUser,
271
+ activeModule: activeModule,
272
+ activeEntity: activeEntity
273
+ });
274
+ });
275
+ // Listen for localStorage changes from other tabs/windows
276
+ this.setupStorageListener();
277
+ }
278
+ /**
279
+ * Set the current user
280
+ */
281
+ setUser(user) {
282
+ this.currentUserSignal.set(user);
283
+ }
284
+ /**
285
+ * Update user data (partial update)
286
+ */
287
+ updateUser(updates) {
288
+ const currentUser = this.currentUserSignal();
289
+ if (currentUser) {
290
+ this.currentUserSignal.set({ ...currentUser, ...updates });
291
+ }
292
+ }
293
+ /**
294
+ * Clear user data
295
+ */
296
+ clearUser() {
297
+ this.currentUserSignal.set(null);
298
+ }
299
+ /**
300
+ * Get current user value (non-reactive)
301
+ */
302
+ getUserValue() {
303
+ return this.currentUserSignal();
304
+ }
305
+ /**
306
+ * Set the active module
307
+ */
308
+ setActiveModule(module) {
309
+ this.activeModuleSignal.set(module);
310
+ }
311
+ /**
312
+ * Get active module value (non-reactive)
313
+ */
314
+ getActiveModuleValue() {
315
+ return this.activeModuleSignal();
316
+ }
317
+ /**
318
+ * Set the active entity
319
+ */
320
+ setActiveEntity(entity) {
321
+ this.activeEntitySignal.set(entity);
322
+ }
323
+ /**
324
+ * Get active entity value (non-reactive)
325
+ */
326
+ getActiveEntityValue() {
327
+ return this.activeEntitySignal();
328
+ }
329
+ /**
330
+ * Manually refresh state from localStorage
331
+ * Call this method when you need to sync with external localStorage changes
332
+ */
333
+ refreshFromLocalStorage() {
334
+ this.loadFromLocalStorage();
335
+ }
336
+ /**
337
+ * Check if localStorage is available (browser environment)
338
+ */
339
+ isLocalStorageAvailable() {
340
+ try {
341
+ return typeof window !== 'undefined' && typeof localStorage !== 'undefined';
342
+ }
343
+ catch {
344
+ return false;
345
+ }
346
+ }
347
+ /**
348
+ * Save state to localStorage
349
+ */
350
+ saveToLocalStorage(data) {
351
+ if (!this.isLocalStorageAvailable()) {
352
+ return;
353
+ }
354
+ try {
355
+ if (data.user !== undefined) {
356
+ if (data.user) {
357
+ localStorage.setItem('cide_auth_user', JSON.stringify(data.user));
358
+ }
359
+ else {
360
+ localStorage.removeItem('cide_auth_user');
361
+ }
362
+ }
363
+ if (data.activeModule !== undefined) {
364
+ if (data.activeModule) {
365
+ localStorage.setItem('cide_active_module', JSON.stringify(data.activeModule));
366
+ }
367
+ else {
368
+ localStorage.removeItem('cide_active_module');
369
+ }
370
+ }
371
+ if (data.activeEntity !== undefined) {
372
+ if (data.activeEntity) {
373
+ localStorage.setItem('cide_active_entity', JSON.stringify(data.activeEntity));
374
+ }
375
+ else {
376
+ localStorage.removeItem('cide_active_entity');
377
+ }
378
+ }
379
+ }
380
+ catch (error) {
381
+ console.error('Error saving to localStorage:', error);
382
+ }
383
+ }
384
+ /**
385
+ * Load state from localStorage
386
+ */
387
+ loadFromLocalStorage() {
388
+ if (!this.isLocalStorageAvailable()) {
389
+ return;
390
+ }
391
+ try {
392
+ const userData = localStorage.getItem('cide_auth_user');
393
+ if (userData) {
394
+ const user = JSON.parse(userData);
395
+ this.currentUserSignal.set(user);
396
+ }
397
+ const moduleData = localStorage.getItem('cide_active_module');
398
+ if (moduleData) {
399
+ const module = JSON.parse(moduleData);
400
+ this.activeModuleSignal.set(module);
401
+ }
402
+ const entityData = localStorage.getItem('cide_active_entity');
403
+ if (entityData) {
404
+ const entity = JSON.parse(entityData);
405
+ this.activeEntitySignal.set(entity);
406
+ }
407
+ }
408
+ catch (error) {
409
+ console.error('Error loading from localStorage:', error);
410
+ // Clear corrupted data
411
+ if (this.isLocalStorageAvailable()) {
412
+ localStorage.removeItem('cide_auth_user');
413
+ localStorage.removeItem('cide_active_module');
414
+ localStorage.removeItem('cide_active_entity');
415
+ }
416
+ }
417
+ }
418
+ /**
419
+ * Setup storage event listener to handle external localStorage changes
420
+ */
421
+ setupStorageListener() {
422
+ if (!this.isLocalStorageAvailable()) {
423
+ return;
424
+ }
425
+ // Listen for storage events (triggered when localStorage is modified from other tabs/windows)
426
+ window.addEventListener('storage', (event) => {
427
+ if (!event.key)
428
+ return;
429
+ try {
430
+ // Handle user data changes
431
+ if (event.key === 'cide_auth_user') {
432
+ if (event.newValue) {
433
+ const user = JSON.parse(event.newValue);
434
+ this.currentUserSignal.set(user);
435
+ }
436
+ else {
437
+ this.currentUserSignal.set(null);
438
+ }
439
+ }
440
+ // Handle active module changes
441
+ if (event.key === 'cide_active_module') {
442
+ if (event.newValue) {
443
+ const module = JSON.parse(event.newValue);
444
+ this.activeModuleSignal.set(module);
445
+ }
446
+ else {
447
+ this.activeModuleSignal.set(null);
448
+ }
449
+ }
450
+ // Handle active entity changes
451
+ if (event.key === 'cide_active_entity') {
452
+ if (event.newValue) {
453
+ const entity = JSON.parse(event.newValue);
454
+ this.activeEntitySignal.set(entity);
455
+ }
456
+ else {
457
+ this.activeEntitySignal.set(null);
458
+ }
459
+ }
460
+ }
461
+ catch (error) {
462
+ console.error('Error parsing localStorage update:', error);
463
+ }
464
+ });
465
+ }
466
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
467
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateService, providedIn: 'root' }); }
468
+ }
469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateService, decorators: [{
470
+ type: Injectable,
471
+ args: [{
472
+ providedIn: 'root'
473
+ }]
474
+ }], ctorParameters: () => [] });
475
+
476
+ class AppStateHelperService {
477
+ constructor() {
478
+ this.appStateService = inject(AppStateService);
479
+ this.sidebarService = inject(CideLytSidebarService);
480
+ // Computed signals for derived state
481
+ this.currentUser = this.appStateService.currentUser;
482
+ this.isAuthenticated = this.appStateService.isAuthenticated;
483
+ this.userInfo = this.appStateService.userInfo;
484
+ this.activeModule = this.appStateService.activeModule;
485
+ this.activeModuleInfo = this.appStateService.activeModuleInfo;
486
+ this.activeEntity = this.appStateService.activeEntity;
487
+ }
488
+ /**
489
+ * Get current user value (non-reactive)
490
+ */
491
+ getCurrentUser() {
492
+ return this.appStateService.getUserValue();
493
+ }
494
+ /**
495
+ * Set user data
496
+ */
497
+ setUser(user) {
498
+ this.appStateService.setUser(user);
499
+ }
500
+ /**
501
+ * Update user data (partial update)
502
+ */
503
+ updateUser(updates) {
504
+ this.appStateService.updateUser(updates);
505
+ }
506
+ /**
507
+ * Clear user data
508
+ */
509
+ clearUser() {
510
+ this.appStateService.clearUser();
511
+ }
512
+ /**
513
+ * Check if user is authenticated
514
+ */
515
+ isUserAuthenticated() {
516
+ return this.appStateService.isAuthenticated();
517
+ }
518
+ /**
519
+ * Get user info object
520
+ */
521
+ getUserInfo() {
522
+ return this.appStateService.userInfo();
523
+ }
524
+ /**
525
+ * Get user ID
526
+ */
527
+ getUserId() {
528
+ const user = this.getCurrentUser();
529
+ return user?._id || null;
530
+ }
531
+ /**
532
+ * Get user name
533
+ */
534
+ getUserName() {
535
+ const userInfo = this.getUserInfo();
536
+ return userInfo?.name || null;
537
+ }
538
+ /**
539
+ * Get user email
540
+ */
541
+ getUserEmail() {
542
+ const userInfo = this.getUserInfo();
543
+ return userInfo?.email || null;
544
+ }
545
+ /**
546
+ * Get user username
547
+ */
548
+ getUserUsername() {
549
+ const user = this.getCurrentUser();
550
+ return user?.user_username || null;
551
+ }
552
+ /**
553
+ * Get user full name
554
+ */
555
+ getUserFullName() {
556
+ const user = this.getCurrentUser();
557
+ return user?.user_fullname || null;
558
+ }
559
+ /**
560
+ * Get user first name
561
+ */
562
+ getUserFirstName() {
563
+ const user = this.getCurrentUser();
564
+ return user?.user_firstname || null;
565
+ }
566
+ /**
567
+ * Get user last name
568
+ */
569
+ getUserLastName() {
570
+ const user = this.getCurrentUser();
571
+ return user?.user_lastname || null;
572
+ }
573
+ /**
574
+ * Get user mobile number
575
+ */
576
+ getUserMobile() {
577
+ const user = this.getCurrentUser();
578
+ return user?.user_mobileno || null;
579
+ }
580
+ /**
581
+ * Set the active module
582
+ */
583
+ setActiveModule(module) {
584
+ this.appStateService.setActiveModule(module);
585
+ }
586
+ /**
587
+ * Get active module value (non-reactive)
588
+ */
589
+ getActiveModule() {
590
+ return this.appStateService.getActiveModuleValue();
591
+ }
592
+ /**
593
+ * Get active module info
594
+ */
595
+ getActiveModuleInfo() {
596
+ return this.appStateService.activeModuleInfo();
597
+ }
598
+ /**
599
+ * Get active module ID
600
+ */
601
+ getActiveModuleId() {
602
+ const module = this.getActiveModule();
603
+ return module?._id || null;
604
+ }
605
+ /**
606
+ * Get active module title
607
+ */
608
+ getActiveModuleTitle() {
609
+ const moduleInfo = this.getActiveModuleInfo();
610
+ return moduleInfo?.title || null;
611
+ }
612
+ /**
613
+ * Get active module icon
614
+ */
615
+ getActiveModuleIcon() {
616
+ const moduleInfo = this.getActiveModuleInfo();
617
+ return moduleInfo?.icon || null;
618
+ }
619
+ /**
620
+ * Set a module as active by its ID
621
+ * This replaces the previous isModuleActive method to use setActiveModule instead of getActiveModuleId
622
+ */
623
+ setActiveModuleById(moduleId) {
624
+ return this.sidebarService.getSidebarMenues({ syme_type: "module", sort: 'asc', syme_title: "" }).pipe(map(response => {
625
+ const modules = response?.data || [];
626
+ const targetModule = modules.find(module => module._id === moduleId);
627
+ if (targetModule) {
628
+ this.setActiveModule(targetModule);
629
+ return true;
630
+ }
631
+ else {
632
+ console.warn(`Module with ID "${moduleId}" not found`);
633
+ return false;
634
+ }
635
+ }));
636
+ }
637
+ /**
638
+ * Check if a module is active (keeping the original functionality for backward compatibility)
639
+ */
640
+ isModuleActive(moduleId) {
641
+ const activeModuleId = this.getActiveModuleId();
642
+ return activeModuleId === moduleId;
643
+ }
644
+ /**
645
+ * Set the active entity
646
+ */
647
+ setActiveEntity(entity) {
648
+ this.appStateService.setActiveEntity(entity);
649
+ }
650
+ /**
651
+ * Get active entity value (non-reactive)
652
+ */
653
+ getActiveEntity() {
654
+ return this.appStateService.getActiveEntityValue();
655
+ }
656
+ /**
657
+ * Get active entity ID
658
+ */
659
+ getActiveEntityId() {
660
+ const entity = this.getActiveEntity();
661
+ return entity?._id || '';
662
+ }
663
+ /**
664
+ * Get active entity name
665
+ */
666
+ getActiveEntityName() {
667
+ const entity = this.getActiveEntity();
668
+ return entity?.syen_name || null;
669
+ }
670
+ /**
671
+ * Get active entity code
672
+ */
673
+ getActiveEntityCode() {
674
+ const entity = this.getActiveEntity();
675
+ return entity?.syen_entity_code || null;
676
+ }
677
+ /**
678
+ * Manually refresh state from localStorage
679
+ */
680
+ refreshFromLocalStorage() {
681
+ this.appStateService.refreshFromLocalStorage();
682
+ }
683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
684
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateHelperService, providedIn: 'root' }); }
685
+ }
686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AppStateHelperService, decorators: [{
687
+ type: Injectable,
688
+ args: [{
689
+ providedIn: 'root'
690
+ }]
691
+ }] });
692
+
693
+ class CideLytSharedService {
694
+ constructor() {
695
+ // Clean up expired cache entries every minute
696
+ // setInterval(() => this.cleanExpiredCache(), 60000);
697
+ // Enhanced reactive cache with signals
698
+ this.pageDataCacheSignal = signal({});
699
+ this.loadingStateSignal = signal({});
700
+ // Public readonly access to cache
701
+ this.pageDataCache = this.pageDataCacheSignal.asReadonly();
702
+ this.loadingStates = this.loadingStateSignal.asReadonly();
703
+ // Computed signal for cache status
704
+ this.cacheInfo = computed(() => {
705
+ const cache = this.pageDataCacheSignal();
706
+ return {
707
+ totalCached: Object.keys(cache).length,
708
+ validCached: Object.values(cache).filter(item => this.isCacheValid(item)).length,
709
+ expiredCached: Object.values(cache).filter(item => !this.isCacheValid(item)).length
710
+ };
711
+ });
712
+ // In-flight requests to prevent duplicate API calls
713
+ this.inflightRequests = {};
714
+ // Default cache TTL (5 minutes)
715
+ this.DEFAULT_CACHE_TTL = 5 * 60 * 1000;
716
+ // Modern Angular v20 dependency injection pattern
717
+ this.elementService = inject(CideElementsService);
718
+ this.http = inject(HttpClient);
719
+ this.titleService = inject(Title);
720
+ this.sidebarService = inject(CideLytSidebarService);
721
+ this.headerService = inject(CideLytHeaderService);
722
+ this.footerService = inject(CideLytFooterService);
723
+ this.consoleService = inject(CideLytConsoleService);
724
+ this.sidedrawerService = inject(CideLytSidedrawerService);
725
+ this.router = inject(Router);
726
+ // Import AppStateHelperService for sidebar sync
727
+ this.appState = inject(AppStateHelperService);
728
+ // Listen to route changes - moved from request service
729
+ this.routeSubscription = this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
730
+ // Cancel any ongoing page data fetching
731
+ this.pageDataSubscription?.unsubscribe();
732
+ this.handleRouteChange();
733
+ });
734
+ }
735
+ /**
736
+ * Register tab management callback from request service
737
+ * This allows shared service to call request service without circular dependency
738
+ */
739
+ registerTabManagement(callback) {
740
+ this.tabManagementCallback = callback;
741
+ console.log('✅ Tab management callback registered');
742
+ }
743
+ /**
744
+ * Register request visibility callback from request service
745
+ * This allows shared service to control request wrapper visibility
746
+ */
747
+ registerRequestVisibility(callback) {
748
+ this.requestVisibilityCallback = callback;
749
+ console.log('✅ Request visibility callback registered');
750
+ }
751
+ /**
752
+ * Enhanced loadPageData with caching and deduplication
753
+ * @param body - Request payload
754
+ * @param forceRefresh - Force API call even if cached data exists
755
+ * @param customTTL - Custom cache TTL in milliseconds
756
+ */
757
+ loadPageData(body, forceRefresh = false, customTTL = this.DEFAULT_CACHE_TTL) {
758
+ const pageCode = body.sypg_page_code?.toString() || '';
759
+ if (!pageCode) {
760
+ return throwError(() => new Error('Page code is required'));
761
+ }
762
+ // Check if we have valid cached data and not forcing refresh
763
+ if (!forceRefresh && this.hasValidCache(pageCode)) {
764
+ console.log(`🔄 CACHE HIT: Using cached data for page code: ${pageCode}`);
765
+ const cachedData = this.pageDataCacheSignal()[pageCode];
766
+ return of(cachedData.response);
767
+ }
768
+ // Check if there's already an in-flight request for this page code
769
+ if (this.inflightRequests[pageCode]) {
770
+ console.log(`🔄 INFLIGHT REQUEST: Returning existing request for page code: ${pageCode}`);
771
+ return this.inflightRequests[pageCode];
772
+ }
773
+ // Set loading state
774
+ this.setLoadingState(pageCode, true);
775
+ console.log(`🌐 API CALL: Loading fresh data for page code: ${pageCode}`);
776
+ // Create new API request
777
+ const request$ = this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.getPageData]), body);
778
+ // Cache the observable to prevent duplicate requests
779
+ this.inflightRequests[pageCode] = request$.pipe(tap(response => {
780
+ console.log(`✅ API SUCCESS: Caching data for page code: ${pageCode}`);
781
+ this.cachePageData(pageCode, body, response, customTTL);
782
+ this.setLoadingState(pageCode, false);
783
+ }), catchError(error => {
784
+ console.error(`❌ API ERROR: Failed to load data for page code: ${pageCode}`, error);
785
+ this.setLoadingState(pageCode, false);
786
+ return throwError(() => error);
787
+ }), shareReplay(1) // Share the result with multiple subscribers
788
+ );
789
+ // Clean up inflight request after completion
790
+ this.inflightRequests[pageCode].subscribe({
791
+ complete: () => {
792
+ delete this.inflightRequests[pageCode];
793
+ },
794
+ error: () => {
795
+ delete this.inflightRequests[pageCode];
796
+ }
797
+ });
798
+ return this.inflightRequests[pageCode];
799
+ }
800
+ /**
801
+ * Consolidated method to load and process page data
802
+ * This replaces the separate calls in request service and shared wrapper
803
+ */
804
+ loadAndProcessPageData(body, options = {}) {
805
+ const { forceRefresh = false, customTTL = this.DEFAULT_CACHE_TTL, setTitle = true, setSidebarContext = true, updateLayout = true } = options;
806
+ return this.loadPageData(body, forceRefresh, customTTL).pipe(tap(response => {
807
+ if (response) {
808
+ console.log('🔍 SHARED SERVICE: loadAndProcessPageData', response);
809
+ // Process the response
810
+ if (updateLayout) {
811
+ this.setPageData(response, body);
812
+ }
813
+ // Set page title
814
+ if (setTitle && response.data?.page?.sypg_title) {
815
+ this.titleService.setTitle(response.data.page.sypg_title);
816
+ }
817
+ // Set sidebar context
818
+ if (setSidebarContext) {
819
+ // This will be handled by the component that needs the context
820
+ // as it's specific to the sidedrawer service
821
+ }
822
+ }
823
+ }));
824
+ }
825
+ /**
826
+ * Get cached page data without making API call
827
+ */
828
+ getCachedPageData(pageCode) {
829
+ const cached = this.pageDataCacheSignal()[pageCode];
830
+ return this.isCacheValid(cached) ? cached.response : null;
831
+ }
832
+ /**
833
+ * Check if loading for a specific page code
834
+ */
835
+ isLoading(pageCode) {
836
+ return this.loadingStates()[pageCode] || false;
837
+ }
838
+ /**
839
+ * Invalidate cache for specific page code
840
+ */
841
+ invalidateCache(pageCode) {
842
+ const cache = { ...this.pageDataCacheSignal() };
843
+ delete cache[pageCode];
844
+ this.pageDataCacheSignal.set(cache);
845
+ console.log(`🗑️ CACHE INVALIDATED: Removed cache for page code: ${pageCode}`);
846
+ }
847
+ /**
848
+ * Clear all cached data
849
+ */
850
+ clearAllCache() {
851
+ this.pageDataCacheSignal.set({});
852
+ this.loadingStateSignal.set({});
853
+ console.log('🗑️ CACHE CLEARED: All cached data removed');
854
+ }
855
+ /**
856
+ * Preload page data for better performance
857
+ */
858
+ preloadPageData(pageCodes) {
859
+ pageCodes.forEach(pageCode => {
860
+ if (!this.hasValidCache(pageCode) && !this.isLoading(pageCode)) {
861
+ this.loadPageData({ sypg_page_code: pageCode }).subscribe({
862
+ next: () => console.log(`🚀 PRELOADED: Page data for ${pageCode}`),
863
+ error: (err) => console.warn(`⚠️ PRELOAD FAILED: Could not preload ${pageCode}`, err)
864
+ });
865
+ }
866
+ });
867
+ }
868
+ // Private helper methods
869
+ hasValidCache(pageCode) {
870
+ const cached = this.pageDataCacheSignal()[pageCode];
871
+ return cached && this.isCacheValid(cached);
872
+ }
873
+ isCacheValid(cached) {
874
+ if (!cached)
875
+ return false;
876
+ return Date.now() - cached.timestamp < cached.ttl;
877
+ }
878
+ cachePageData(pageCode, request, response, ttl) {
879
+ const cache = { ...this.pageDataCacheSignal() };
880
+ cache[pageCode] = {
881
+ request,
882
+ response,
883
+ timestamp: Date.now(),
884
+ ttl
885
+ };
886
+ this.pageDataCacheSignal.set(cache);
887
+ }
888
+ setLoadingState(pageCode, loading) {
889
+ const loadingStates = { ...this.loadingStateSignal() };
890
+ if (loading) {
891
+ loadingStates[pageCode] = true;
892
+ }
893
+ else {
894
+ delete loadingStates[pageCode];
895
+ }
896
+ this.loadingStateSignal.set(loadingStates);
897
+ }
898
+ cleanExpiredCache() {
899
+ const cache = { ...this.pageDataCacheSignal() };
900
+ let cleaned = false;
901
+ Object.keys(cache).forEach(pageCode => {
902
+ if (!this.isCacheValid(cache[pageCode])) {
903
+ delete cache[pageCode];
904
+ cleaned = true;
905
+ }
906
+ });
907
+ if (cleaned) {
908
+ this.pageDataCacheSignal.set(cache);
909
+ console.log('🧹 CACHE CLEANUP: Removed expired cache entries');
910
+ }
911
+ }
912
+ setPageData(page_data_response, page_data_payload) {
913
+ // to set the controls data to the element service
914
+ console.log('🔍 SHARED SERVICE: setPageData', page_data_response, page_data_payload);
915
+ if (page_data_response?.data?.controls) {
916
+ // Set controls here
917
+ this.elementService.cide_element_data = { ...this.elementService.cide_element_data, ...page_data_response?.data?.controls };
918
+ this.elementService.is_cide_element_data_updated?.next(true);
919
+ }
920
+ // while doing this we need to think about not to touch if this page is not pening in the popup or drower insted of main window
921
+ // Set the layout data
922
+ console.log('🔍 Layout data:', page_data_response);
923
+ if (page_data_response?.data?.theme?.sytm_layout) {
924
+ console.log('🔍 SIDEBAR DEBUG - Layout data:', page_data_response?.data?.theme?.sytm_layout, page_data_payload);
925
+ // check is sidebar is hiden or not (default is visible)
926
+ if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar) {
927
+ const sidebarStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar?.status;
928
+ console.log('🔍 SIDEBAR DEBUG - Sidebar status found:', sidebarStatus);
929
+ if (!sidebarStatus) {
930
+ console.log('🚫 SIDEBAR DEBUG - Hiding sidebar because status is false');
931
+ this.sidebarService.hideSidebar();
932
+ }
933
+ else {
934
+ console.log('✅ SIDEBAR DEBUG - Showing sidebar because status is true');
935
+ this.sidebarService.showSidebar();
936
+ }
937
+ }
938
+ else {
939
+ console.log('⚠️ SIDEBAR DEBUG - No sidebar config found, hiding sidebar');
940
+ this.sidebarService.hideSidebar();
941
+ }
942
+ // check header visible or not
943
+ console.log('🔍 HEADER DEBUG - Header config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header);
944
+ if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header) {
945
+ if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header?.status) {
946
+ this.headerService.hideHeader();
947
+ }
948
+ else {
949
+ this.headerService.showHeader();
950
+ }
951
+ }
952
+ else {
953
+ this.headerService.hideHeader();
954
+ }
955
+ // check footer visible or not
956
+ if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer) {
957
+ if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer?.status) {
958
+ this.footerService.hideFooter();
959
+ }
960
+ else {
961
+ this.footerService.showFooter();
962
+ }
963
+ }
964
+ else {
965
+ this.footerService.hideFooter();
966
+ }
967
+ // check console visible or not
968
+ if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console) {
969
+ if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console?.status) {
970
+ this.consoleService.hideConsole();
971
+ }
972
+ else {
973
+ this.consoleService.showConsole();
974
+ }
975
+ }
976
+ else {
977
+ this.consoleService.hideConsole();
978
+ }
979
+ // check for the request status and log it for debugging
980
+ console.log('🔍 REQUEST DEBUG - Request config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request);
981
+ if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request) {
982
+ const requestStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request?.status;
983
+ console.log('🔍 REQUEST DEBUG - Request status:', requestStatus, 'Type:', typeof requestStatus);
984
+ // The request status controls whether this page should support tabs
985
+ // This is used by the request service to determine if tabs should be created
986
+ if (requestStatus === true) {
987
+ console.log('✅ REQUEST DEBUG - Request is enabled for tabbing');
988
+ // Show request wrapper when request is enabled
989
+ if (this.requestVisibilityCallback) {
990
+ this.requestVisibilityCallback(true);
991
+ console.log('📋 REQUEST VISIBILITY - Showing request wrapper');
992
+ }
993
+ }
994
+ else if (requestStatus === false) {
995
+ console.log('🚫 REQUEST DEBUG - Request is disabled for tabbing');
996
+ // Hide request wrapper when request is disabled
997
+ if (this.requestVisibilityCallback) {
998
+ this.requestVisibilityCallback(false);
999
+ console.log('📋 REQUEST VISIBILITY - Hiding request wrapper');
1000
+ }
1001
+ }
1002
+ else {
1003
+ console.log('⚠️ REQUEST DEBUG - Unexpected request status value:', requestStatus);
1004
+ // Default to hiding request wrapper for unexpected values
1005
+ if (this.requestVisibilityCallback) {
1006
+ this.requestVisibilityCallback(false);
1007
+ console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (unexpected value)');
1008
+ }
1009
+ }
1010
+ }
1011
+ else {
1012
+ console.log('⚠️ REQUEST DEBUG - No request config found, tabs will not be created');
1013
+ // Hide request wrapper when no request config found
1014
+ if (this.requestVisibilityCallback) {
1015
+ this.requestVisibilityCallback(false);
1016
+ console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (no config)');
1017
+ }
1018
+ }
1019
+ }
1020
+ }
1021
+ /**
1022
+ * Handle route changes - moved from request service for better architecture
1023
+ * This method loads page data and calls request service to manage tabs
1024
+ */
1025
+ handleRouteChange() {
1026
+ const parsedUrl = this.router.parseUrl(this.router.url);
1027
+ const currentRoutePath = '/' + (parsedUrl.root.children['primary']?.segments.map(s => s.path).join('/') || '');
1028
+ const queryParams = parsedUrl.queryParams;
1029
+ console.log('🔍 Route change:', {
1030
+ currentRoutePath,
1031
+ queryParams
1032
+ });
1033
+ // Get page code from route data
1034
+ let route = this.router.routerState.snapshot.root;
1035
+ while (route.firstChild) {
1036
+ route = route.firstChild;
1037
+ }
1038
+ const pageCode = route.data && route.data['sypg_page_code'];
1039
+ console.log('📄 Processing route with page code:', pageCode);
1040
+ if (pageCode) {
1041
+ const entityId = this.appState.getActiveEntityId();
1042
+ console.log(`📡 Loading and processing page data for pageCode: ${pageCode}`);
1043
+ this.pageDataSubscription = this.loadAndProcessPageData({ sypg_page_code: pageCode, sytm_entity_id_syen: entityId || undefined }, {
1044
+ forceRefresh: false,
1045
+ setTitle: true,
1046
+ setSidebarContext: true,
1047
+ updateLayout: true
1048
+ }).pipe(take(1))
1049
+ .subscribe({
1050
+ next: (page_data_response) => {
1051
+ const layout = page_data_response?.data?.theme?.sytm_layout;
1052
+ // Update sidedrawer with processed layout
1053
+ this.sidedrawerService.updateDrawerItems(layout);
1054
+ // Sync sidebar active menu with loaded page
1055
+ this.syncSidebarActiveMenu(page_data_response, pageCode);
1056
+ if (layout?.sytm_layout_request?.status === true) {
1057
+ console.log('✅ Layout processed - calling request service to manage tabs');
1058
+ // Call request service to handle tab creation
1059
+ this.handleTabRequest(currentRoutePath, queryParams, layout, page_data_response, pageCode);
1060
+ }
1061
+ else {
1062
+ console.log('❌ Layout request disabled - tab not created');
1063
+ }
1064
+ },
1065
+ error: (err) => {
1066
+ console.error(`❌ Error loading page data for sypg_page_code '${pageCode}':`, err);
1067
+ this.sidedrawerService.updateDrawerItems(undefined);
1068
+ }
1069
+ });
1070
+ }
1071
+ else {
1072
+ console.log('⚠️ No page code found in route data - clearing drawer');
1073
+ this.sidedrawerService.updateDrawerItems(undefined);
1074
+ }
1075
+ }
1076
+ /**
1077
+ * Handle tab request by calling request service
1078
+ */
1079
+ handleTabRequest(currentRoutePath, queryParams, layout, pageData, pageCode) {
1080
+ if (this.tabManagementCallback) {
1081
+ console.log('🔄 Calling registered tab management callback');
1082
+ this.tabManagementCallback(currentRoutePath, queryParams, layout, pageData, pageCode);
1083
+ }
1084
+ else {
1085
+ console.log('⚠️ No tab management callback registered');
1086
+ }
1087
+ }
1088
+ /**
1089
+ * Sync the active menu in the sidebar based on the loaded page data.
1090
+ * This ensures the correct module is highlighted in the sidebar.
1091
+ */
1092
+ syncSidebarActiveMenu(page_data_response, pageCode) {
1093
+ console.log('🔍 SIDEBAR SYNC: Starting sidebar active menu sync for:', pageCode);
1094
+ // Try to extract module information from route
1095
+ const currentRoute = this.router.url;
1096
+ const routeParts = currentRoute.split('/').filter(part => part);
1097
+ let routeModuleName = '';
1098
+ // Look for control-panel or module identifier in route
1099
+ if (routeParts.includes('control-panel') && routeParts.length > 1) {
1100
+ const moduleIndex = routeParts.indexOf('control-panel') + 1;
1101
+ routeModuleName = routeParts[moduleIndex] || '';
1102
+ }
1103
+ else if (routeParts.length > 0) {
1104
+ routeModuleName = routeParts[0];
1105
+ }
1106
+ console.log('🔍 SIDEBAR SYNC: Route module name:', routeModuleName);
1107
+ console.log('🔍 SIDEBAR SYNC: Current route:', currentRoute);
1108
+ console.log('🔍 SIDEBAR SYNC: Page code:', pageCode);
1109
+ // Load sidebar modules and find the matching one
1110
+ this.sidebarService.getSidebarMenues({ syme_type: "module", sort: 'asc', syme_title: "" })
1111
+ .subscribe({
1112
+ next: (modulesResponse) => {
1113
+ const modules = modulesResponse?.data || [];
1114
+ console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => ({ id: m._id, title: m.syme_title, path: m.syme_path })));
1115
+ let matchedModule = null;
1116
+ // Try to match by route path
1117
+ if (routeModuleName) {
1118
+ matchedModule = modules.find(m => m.syme_path?.includes(routeModuleName) ||
1119
+ m.syme_title?.toLowerCase().includes(routeModuleName.toLowerCase()) ||
1120
+ routeModuleName.includes(m.syme_path || '') ||
1121
+ m.syme_path === routeModuleName);
1122
+ if (matchedModule) {
1123
+ console.log('✅ SIDEBAR SYNC: Matched module by route:', matchedModule.syme_title);
1124
+ }
1125
+ }
1126
+ // If not found, try to match by page code pattern
1127
+ if (!matchedModule && pageCode) {
1128
+ matchedModule = modules.find(m => pageCode.includes(m.syme_path || '') ||
1129
+ (m.syme_path && pageCode.toLowerCase().includes(m.syme_path.toLowerCase())) ||
1130
+ m.syme_path === pageCode);
1131
+ if (matchedModule) {
1132
+ console.log('✅ SIDEBAR SYNC: Matched module by page code:', matchedModule.syme_title);
1133
+ }
1134
+ }
1135
+ // If still not found, try partial matching for common patterns
1136
+ if (!matchedModule) {
1137
+ // Try to match common patterns like 'admin', 'dashboard', etc.
1138
+ const searchTerms = [routeModuleName, pageCode].filter(Boolean);
1139
+ for (const term of searchTerms) {
1140
+ matchedModule = modules.find(m => m.syme_title?.toLowerCase().includes(term.toLowerCase()) ||
1141
+ term.toLowerCase().includes(m.syme_title?.toLowerCase() || '') ||
1142
+ m.syme_path?.toLowerCase().includes(term.toLowerCase()) ||
1143
+ term.toLowerCase().includes(m.syme_path?.toLowerCase() || ''));
1144
+ if (matchedModule) {
1145
+ console.log('✅ SIDEBAR SYNC: Matched module by pattern:', matchedModule.syme_title, 'for term:', term);
1146
+ break;
1147
+ }
1148
+ }
1149
+ }
1150
+ // Check if we should set the matched module as active
1151
+ if (matchedModule) {
1152
+ const currentActiveModule = this.appState.getActiveModule();
1153
+ // Be more conservative about overriding user selections
1154
+ // Only set the module if no module is currently active
1155
+ const shouldSetModule = !currentActiveModule;
1156
+ if (shouldSetModule) {
1157
+ console.log('🎯 SIDEBAR SYNC: No active module, setting:', matchedModule.syme_title, matchedModule._id);
1158
+ this.appState.setActiveModule(matchedModule);
1159
+ }
1160
+ else {
1161
+ console.log('✅ SIDEBAR SYNC: Module already active, respecting user selection:', currentActiveModule?.syme_title);
1162
+ console.log('🔍 SIDEBAR SYNC: Route suggests:', matchedModule.syme_title, '- not overriding');
1163
+ }
1164
+ }
1165
+ else {
1166
+ console.log('⚠️ SIDEBAR SYNC: No matching module found for page:', pageCode);
1167
+ console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => m.syme_title).join(', '));
1168
+ console.log('🔍 SIDEBAR SYNC: Searched for route:', routeModuleName, 'and page code:', pageCode);
1169
+ }
1170
+ },
1171
+ error: (err) => {
1172
+ console.error('❌ SIDEBAR SYNC: Error loading modules for sync:', err);
1173
+ }
1174
+ });
1175
+ }
1176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSharedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1177
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSharedService, providedIn: 'root' }); }
1178
+ }
1179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSharedService, decorators: [{
1180
+ type: Injectable,
1181
+ args: [{
1182
+ providedIn: 'root'
1183
+ }]
1184
+ }], ctorParameters: () => [] });
1185
+
1186
+ class CideLytSharedWrapperComponent {
1187
+ constructor() {
1188
+ this.shared_wrapper_setup_param = {};
1189
+ this.page_data = {};
1190
+ this.sharedService = inject(CideLytSharedService);
1191
+ this.sidedrawerService = inject(CideLytSidedrawerService);
1192
+ this.appState = inject(AppStateHelperService);
1193
+ }
1194
+ ngOnInit() {
1195
+ // Load and process page data using modern approach
1196
+ if (this.shared_wrapper_setup_param?.sypg_page_code) {
1197
+ const entityId = this.appState.getActiveEntityId();
1198
+ const page_data_payload = {
1199
+ sypg_page_code: this.shared_wrapper_setup_param?.sypg_page_code,
1200
+ sytm_entity_id_syen: entityId || undefined
1201
+ };
1202
+ console.log('🔍 Page data payload:', page_data_payload);
1203
+ this.sharedService.loadAndProcessPageData(page_data_payload, {
1204
+ setTitle: true,
1205
+ setSidebarContext: true,
1206
+ updateLayout: true
1207
+ }).subscribe({
1208
+ next: (page_data_response) => {
1209
+ console.log('✅ SHARED WRAPPER: Page data loaded and processed for:', page_data_payload.sypg_page_code);
1210
+ this.page_data = page_data_response?.data || {};
1211
+ // Sidebar context is automatically set by loadAndProcessPageData when setSidebarContext: true
1212
+ const pageId = page_data_response?.data?.page?._id || '';
1213
+ const themeId = page_data_response?.data?.theme?._id || '';
1214
+ this.sidedrawerService.setContext(pageId, themeId);
1215
+ },
1216
+ error: (err) => {
1217
+ console.error('❌ SHARED WRAPPER: Error loading page data:', err);
1218
+ }
1219
+ });
1220
+ }
1221
+ }
1222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSharedWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1223
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytSharedWrapperComponent, isStandalone: true, selector: "cide-lyt-shared-wrapper", ngImport: i0, template: "<p>shared-wrapper works!</p>\r\n", styles: [""] }); }
1224
+ }
1225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSharedWrapperComponent, decorators: [{
1226
+ type: Component,
1227
+ args: [{ selector: 'cide-lyt-shared-wrapper', standalone: true, imports: [], template: "<p>shared-wrapper works!</p>\r\n" }]
1228
+ }] });
1229
+
1230
+ class CideLytHeaderWrapperComponent extends CideLytSharedWrapperComponent {
1231
+ constructor() {
1232
+ super();
1233
+ this.shared_wrapper_setup_param = {
1234
+ sypg_page_code: "cide_lyt_header"
1235
+ };
1236
+ this.syen_photo = {};
1237
+ this.headerService = inject(CideLytHeaderService);
1238
+ this.fileManagerService = inject(CideLytFileManagerService);
1239
+ this.router = inject(Router);
1240
+ }
1241
+ ngAfterViewInit() {
1242
+ this.fileManagerService?.getFileDetails({ cyfm_id: '6724b247c2b5da7d83b04c91' })?.subscribe({
1243
+ next: (fileDetails) => {
1244
+ if (fileDetails?.data?.length) {
1245
+ this.syen_photo = fileDetails?.data[0];
1246
+ }
1247
+ },
1248
+ error: (error) => {
1249
+ console.error('Error loading file details:', error);
1250
+ }
1251
+ });
1252
+ }
1253
+ /**
1254
+ * Handles logo click to navigate back to control panel home
1255
+ */
1256
+ onLogoClick() {
1257
+ this.router.navigate(['/control-panel']);
1258
+ }
1259
+ /**
1260
+ * Updates the tooltip position based on mouse event
1261
+ * Similar to the sidebar tooltip positioning
1262
+ * @param event Mouse event from icon hover
1263
+ */
1264
+ updateTooltipPosition(event) {
1265
+ // Find the tooltip element within the event target's parent
1266
+ const iconElement = event.currentTarget;
1267
+ const tooltip = iconElement.querySelector('.header-tooltip');
1268
+ if (tooltip) {
1269
+ // Ensure the tooltip is properly positioned
1270
+ const rect = iconElement.getBoundingClientRect();
1271
+ const headerRect = document.getElementById('cide-lyt-header-wrapper')?.getBoundingClientRect();
1272
+ if (headerRect) {
1273
+ // Adjust tooltip position if it would go outside the viewport
1274
+ const viewportWidth = window.innerWidth;
1275
+ const tooltipWidth = tooltip.offsetWidth;
1276
+ // Center the tooltip under the icon
1277
+ let leftPosition = '50%';
1278
+ let transform = 'translateX(-50%)';
1279
+ // Check if tooltip would extend beyond right edge
1280
+ if (rect.left + tooltipWidth / 2 > viewportWidth) {
1281
+ leftPosition = 'auto';
1282
+ tooltip.style.right = '0';
1283
+ transform = 'translateX(0)';
1284
+ }
1285
+ // Check if tooltip would extend beyond left edge
1286
+ if (rect.left - tooltipWidth / 2 < 0) {
1287
+ leftPosition = '0';
1288
+ tooltip.style.right = 'auto';
1289
+ transform = 'translateX(0)';
1290
+ }
1291
+ if (leftPosition !== 'auto' && leftPosition !== '0') {
1292
+ tooltip.style.left = leftPosition;
1293
+ }
1294
+ tooltip.style.transform = transform;
1295
+ }
1296
+ }
1297
+ }
1298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytHeaderWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1299
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytHeaderWrapperComponent, isStandalone: true, selector: "cide-lyt-header-wrapper", usesInheritance: true, ngImport: i0, template: "<header id=\"cide-lyt-header-wrapper\" class=\"cide-lyt-header tw-w-full tw-select-none cide-lyt-header-wrapper-hide\">\n <!-- Logo Section -->\n <div class=\"header-logo-container tw-cursor-pointer\" \n (click)=\"onLogoClick()\" \n (keydown.enter)=\"onLogoClick()\" \n (keydown.space)=\"onLogoClick()\"\n tabindex=\"0\" \n role=\"button\"\n aria-label=\"Navigate to home\"\n title=\"Click to go to control panel home\">\n <img [src]=\"'data:image/png;base64,' + syen_photo.cyfm_file_base64\"\n [alt]=\"syen_photo.cyfm_alt_text ? syen_photo.cyfm_alt_text : 'Entity Logo'\">\n </div>\n <!-- Search Section -->\n <div class=\"header-search-container\">\n <cide-ele-input id=\"cide_lyt_header_search\" placeholder=\"Search...\" leadingIcon=\"search\" size=\"md\"></cide-ele-input>\n </div>\n \n <!-- Icons Section -->\n <div class=\"header-icons-container\">\n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>dashboard</cide-ele-icon>\n <div class=\"header-tooltip\">Dashboard</div>\n </div>\n \n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>notifications</cide-ele-icon>\n <div class=\"header-badge\">3</div>\n <div class=\"header-tooltip\">Notifications</div>\n </div>\n \n <div class=\"header-divider\"></div>\n \n <div class=\"header-icon user-profile\" (mouseenter)=\"updateTooltipPosition($event)\">\n <div class=\"profile-avatar\">AK</div>\n <div class=\"header-tooltip\">My Account</div>\n </div>\n \n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>more_vert</cide-ele-icon>\n <div class=\"header-tooltip\">More Options</div>\n </div>\n </div>\n</header>", styles: [".cide-lyt-header{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(to right,#fffffff2,#f9fafbf2);box-shadow:0 2px 8px #00000008;padding:0 1rem;position:relative;z-index:20;transition:all .3s cubic-bezier(.4,0,.2,1);will-change:transform;border-bottom:1px solid rgba(229,231,235,.8);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.header-logo-container{height:100%;display:flex;align-items:center;padding:.5rem 0;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);border-radius:8px;outline:none}.header-logo-container img{height:30px;max-height:100%;transition:all .3s ease;border-radius:5px;overflow:hidden;box-shadow:0 1px 4px #0000000d}.header-logo-container:hover img{transform:scale(1.03);filter:brightness(1.05);box-shadow:0 2px 6px #00000014}.header-logo-container:after{content:\"\";position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(to bottom right,#fff0,#ffffff4d,#fff0);transform:rotate(30deg);opacity:0;transition:transform .6s ease,opacity .6s ease;pointer-events:none}.header-logo-container:hover:after,.header-logo-container:focus:after{opacity:1;transform:rotate(30deg) translate(50%,50%)}.header-search-container{flex-grow:1;max-width:600px;margin:0 2rem;position:relative;transition:all .3s ease}::ng-deep .header-search-container #cide_lyt_header_search{width:100%;background-color:#f9fafbcc;border-radius:20px!important;transition:all .3s ease;overflow:visible;transform:translateZ(0)}::ng-deep .header-search-container #cide_lyt_header_search:hover{box-shadow:0 3px 12px #00000014;background-color:#fff;transform:translateY(-1px)}::ng-deep .header-search-container #cide_lyt_header_search .cide-input-input{background-color:transparent;font-size:.85rem!important;letter-spacing:.01em}::ng-deep .header-search-container #cide_lyt_header_search .cide-input-leading-icon{color:#6b7280b3!important;font-size:1.1rem!important}::ng-deep .header-search-container #cide_lyt_header_search:focus-within{transform:translateY(-1px) scale(1.01)}::ng-deep .header-search-container #cide_lyt_header_search:focus-within .cide-input-input{border-color:#3b82f6!important}::ng-deep .header-search-container #cide_lyt_header_search:focus-within .cide-input-leading-icon{color:#3b82f6!important}.header-icons-container{display:flex;align-items:center;gap:1rem}.header-icon{position:relative;width:32px;height:32px;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;color:#374151;border-radius:.4rem;margin:0 2px}.header-icon:before{content:\"\";position:absolute;inset:0;background-color:#3b82f61a;border-radius:.5rem;opacity:0;transform:scale(.8);transition:all .2s cubic-bezier(.4,0,.2,1)}.header-icon:hover:before{opacity:1;transform:scale(1)}.header-icon:hover{color:#3b82f6}.header-icon:active{transform:scale(.95)}.header-tooltip{position:absolute;bottom:-26px;left:50%;transform:translate(-50%);background-color:#374151e6;color:#fff;padding:.25rem .6rem;border-radius:.25rem;font-size:.7rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:0 2px 5px #0003;letter-spacing:.01em;will-change:transform,opacity}.header-tooltip:before{content:\"\";position:absolute;bottom:100%;left:50%;transform:translate(-50%);border-width:5px;border-style:solid;border-color:transparent transparent rgba(55,65,81,.9) transparent}.header-icon:hover .header-tooltip{opacity:1;transform:translate(-50%) translateY(0)}.header-badge{position:absolute;top:0;right:0;min-width:16px;height:16px;border-radius:8px;background-color:#ef4444;color:#fff;font-size:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;box-shadow:0 1px 3px #ef44444d;font-weight:600;z-index:2;transition:all .2s ease}.header-icon:hover .header-badge{transform:scale(1.1)}.header-divider{height:20px;width:1px;background-color:#e5e7ebcc;margin:0 6px}.profile-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px #2563eb33;transition:all .2s cubic-bezier(.4,0,.2,1);letter-spacing:-.5px}.header-icon:hover .profile-avatar{transform:scale(1.08);box-shadow:0 3px 8px #2563eb4d}.header-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;transition:all .2s cubic-bezier(.4,0,.2,1);border:2px solid transparent;box-shadow:0 2px 4px #0000001a}.header-avatar:hover{border-color:#3b82f6;transform:scale(1.05);box-shadow:0 3px 6px #3b82f64d}@media (max-width: 768px){.header-search-container{margin:0 1rem}.header-icons-container{gap:.5rem}}@media (max-width: 640px){.header-search-container{max-width:200px;margin:0 .5rem}}\n"], dependencies: [{ kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] }); }
1300
+ }
1301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytHeaderWrapperComponent, decorators: [{
1302
+ type: Component,
1303
+ args: [{ selector: 'cide-lyt-header-wrapper', standalone: true, imports: [CideInputComponent, CommonModule, CideIconComponent], template: "<header id=\"cide-lyt-header-wrapper\" class=\"cide-lyt-header tw-w-full tw-select-none cide-lyt-header-wrapper-hide\">\n <!-- Logo Section -->\n <div class=\"header-logo-container tw-cursor-pointer\" \n (click)=\"onLogoClick()\" \n (keydown.enter)=\"onLogoClick()\" \n (keydown.space)=\"onLogoClick()\"\n tabindex=\"0\" \n role=\"button\"\n aria-label=\"Navigate to home\"\n title=\"Click to go to control panel home\">\n <img [src]=\"'data:image/png;base64,' + syen_photo.cyfm_file_base64\"\n [alt]=\"syen_photo.cyfm_alt_text ? syen_photo.cyfm_alt_text : 'Entity Logo'\">\n </div>\n <!-- Search Section -->\n <div class=\"header-search-container\">\n <cide-ele-input id=\"cide_lyt_header_search\" placeholder=\"Search...\" leadingIcon=\"search\" size=\"md\"></cide-ele-input>\n </div>\n \n <!-- Icons Section -->\n <div class=\"header-icons-container\">\n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>dashboard</cide-ele-icon>\n <div class=\"header-tooltip\">Dashboard</div>\n </div>\n \n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>notifications</cide-ele-icon>\n <div class=\"header-badge\">3</div>\n <div class=\"header-tooltip\">Notifications</div>\n </div>\n \n <div class=\"header-divider\"></div>\n \n <div class=\"header-icon user-profile\" (mouseenter)=\"updateTooltipPosition($event)\">\n <div class=\"profile-avatar\">AK</div>\n <div class=\"header-tooltip\">My Account</div>\n </div>\n \n <div class=\"header-icon\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-icon>more_vert</cide-ele-icon>\n <div class=\"header-tooltip\">More Options</div>\n </div>\n </div>\n</header>", styles: [".cide-lyt-header{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(to right,#fffffff2,#f9fafbf2);box-shadow:0 2px 8px #00000008;padding:0 1rem;position:relative;z-index:20;transition:all .3s cubic-bezier(.4,0,.2,1);will-change:transform;border-bottom:1px solid rgba(229,231,235,.8);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.header-logo-container{height:100%;display:flex;align-items:center;padding:.5rem 0;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);border-radius:8px;outline:none}.header-logo-container img{height:30px;max-height:100%;transition:all .3s ease;border-radius:5px;overflow:hidden;box-shadow:0 1px 4px #0000000d}.header-logo-container:hover img{transform:scale(1.03);filter:brightness(1.05);box-shadow:0 2px 6px #00000014}.header-logo-container:after{content:\"\";position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(to bottom right,#fff0,#ffffff4d,#fff0);transform:rotate(30deg);opacity:0;transition:transform .6s ease,opacity .6s ease;pointer-events:none}.header-logo-container:hover:after,.header-logo-container:focus:after{opacity:1;transform:rotate(30deg) translate(50%,50%)}.header-search-container{flex-grow:1;max-width:600px;margin:0 2rem;position:relative;transition:all .3s ease}::ng-deep .header-search-container #cide_lyt_header_search{width:100%;background-color:#f9fafbcc;border-radius:20px!important;transition:all .3s ease;overflow:visible;transform:translateZ(0)}::ng-deep .header-search-container #cide_lyt_header_search:hover{box-shadow:0 3px 12px #00000014;background-color:#fff;transform:translateY(-1px)}::ng-deep .header-search-container #cide_lyt_header_search .cide-input-input{background-color:transparent;font-size:.85rem!important;letter-spacing:.01em}::ng-deep .header-search-container #cide_lyt_header_search .cide-input-leading-icon{color:#6b7280b3!important;font-size:1.1rem!important}::ng-deep .header-search-container #cide_lyt_header_search:focus-within{transform:translateY(-1px) scale(1.01)}::ng-deep .header-search-container #cide_lyt_header_search:focus-within .cide-input-input{border-color:#3b82f6!important}::ng-deep .header-search-container #cide_lyt_header_search:focus-within .cide-input-leading-icon{color:#3b82f6!important}.header-icons-container{display:flex;align-items:center;gap:1rem}.header-icon{position:relative;width:32px;height:32px;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;color:#374151;border-radius:.4rem;margin:0 2px}.header-icon:before{content:\"\";position:absolute;inset:0;background-color:#3b82f61a;border-radius:.5rem;opacity:0;transform:scale(.8);transition:all .2s cubic-bezier(.4,0,.2,1)}.header-icon:hover:before{opacity:1;transform:scale(1)}.header-icon:hover{color:#3b82f6}.header-icon:active{transform:scale(.95)}.header-tooltip{position:absolute;bottom:-26px;left:50%;transform:translate(-50%);background-color:#374151e6;color:#fff;padding:.25rem .6rem;border-radius:.25rem;font-size:.7rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:0 2px 5px #0003;letter-spacing:.01em;will-change:transform,opacity}.header-tooltip:before{content:\"\";position:absolute;bottom:100%;left:50%;transform:translate(-50%);border-width:5px;border-style:solid;border-color:transparent transparent rgba(55,65,81,.9) transparent}.header-icon:hover .header-tooltip{opacity:1;transform:translate(-50%) translateY(0)}.header-badge{position:absolute;top:0;right:0;min-width:16px;height:16px;border-radius:8px;background-color:#ef4444;color:#fff;font-size:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;box-shadow:0 1px 3px #ef44444d;font-weight:600;z-index:2;transition:all .2s ease}.header-icon:hover .header-badge{transform:scale(1.1)}.header-divider{height:20px;width:1px;background-color:#e5e7ebcc;margin:0 6px}.profile-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px #2563eb33;transition:all .2s cubic-bezier(.4,0,.2,1);letter-spacing:-.5px}.header-icon:hover .profile-avatar{transform:scale(1.08);box-shadow:0 3px 8px #2563eb4d}.header-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;transition:all .2s cubic-bezier(.4,0,.2,1);border:2px solid transparent;box-shadow:0 2px 4px #0000001a}.header-avatar:hover{border-color:#3b82f6;transform:scale(1.05);box-shadow:0 3px 6px #3b82f64d}@media (max-width: 768px){.header-search-container{margin:0 1rem}.header-icons-container{gap:.5rem}}@media (max-width: 640px){.header-search-container{max-width:200px;margin:0 .5rem}}\n"] }]
1304
+ }], ctorParameters: () => [] });
1305
+
1306
+ class CideLytUserStatusService {
1307
+ constructor() {
1308
+ // Modern Angular Signals pattern
1309
+ this._userStatus = signal({
1310
+ status: 'online',
1311
+ lastActive: new Date(),
1312
+ message: undefined
1313
+ });
1314
+ // Public readonly access to status
1315
+ this.userStatus = this._userStatus.asReadonly();
1316
+ // Computed properties
1317
+ this.isOnline = computed(() => this._userStatus().status !== 'offline');
1318
+ this.statusColor = computed(() => this.getStatusColor(this._userStatus().status));
1319
+ this.statusText = computed(() => this.getStatusText(this._userStatus().status));
1320
+ // Legacy observable for compatibility
1321
+ this.statusSubject = new BehaviorSubject(this._userStatus());
1322
+ this.status$ = this.statusSubject.asObservable();
1323
+ // Auto-away functionality
1324
+ this.lastActivityTime = Date.now();
1325
+ this.autoAwayTimeout = 5 * 60 * 1000; // 5 minutes
1326
+ this.autoAwayEnabled = true;
1327
+ this.initializeActivityTracking();
1328
+ this.startAutoAwayTimer();
1329
+ }
1330
+ /**
1331
+ * Sets the user status
1332
+ * @param status The new status to set
1333
+ * @param message Optional custom status message
1334
+ */
1335
+ setStatus(status, message) {
1336
+ const statusData = {
1337
+ status,
1338
+ lastActive: new Date(),
1339
+ message
1340
+ };
1341
+ this._userStatus.set(statusData);
1342
+ this.statusSubject.next(statusData);
1343
+ this.lastActivityTime = Date.now();
1344
+ }
1345
+ /**
1346
+ * Marks user as active (resets away timer)
1347
+ */
1348
+ markUserActive() {
1349
+ this.lastActivityTime = Date.now();
1350
+ // If user was away, bring them back to online
1351
+ if (this._userStatus().status === 'away') {
1352
+ this.setStatus('online');
1353
+ }
1354
+ }
1355
+ /**
1356
+ * Gets CSS class for status color
1357
+ */
1358
+ getStatusColor(status) {
1359
+ switch (status) {
1360
+ case 'online': return 'tw-bg-green-500';
1361
+ case 'away': return 'tw-bg-yellow-500';
1362
+ case 'busy': return 'tw-bg-orange-500';
1363
+ case 'do-not-disturb': return 'tw-bg-red-500';
1364
+ case 'offline': return 'tw-bg-gray-400';
1365
+ default: return 'tw-bg-gray-400';
1366
+ }
1367
+ }
1368
+ /**
1369
+ * Gets human-readable status text
1370
+ */
1371
+ getStatusText(status) {
1372
+ const current = this._userStatus();
1373
+ const baseText = this.getBaseStatusText(status);
1374
+ return current.message ? `${baseText} - ${current.message}` : baseText;
1375
+ }
1376
+ getBaseStatusText(status) {
1377
+ switch (status) {
1378
+ case 'online': return 'Online';
1379
+ case 'away': return 'Away';
1380
+ case 'busy': return 'Busy';
1381
+ case 'do-not-disturb': return 'Do not disturb';
1382
+ case 'offline': return 'Offline';
1383
+ default: return 'Unknown';
1384
+ }
1385
+ }
1386
+ /**
1387
+ * Initialize activity tracking for auto-away
1388
+ */
1389
+ initializeActivityTracking() {
1390
+ if (typeof window === 'undefined')
1391
+ return;
1392
+ const events = ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart', 'click'];
1393
+ events.forEach(event => {
1394
+ document.addEventListener(event, () => {
1395
+ this.markUserActive();
1396
+ }, { passive: true });
1397
+ });
1398
+ }
1399
+ /**
1400
+ * Start the auto-away timer
1401
+ */
1402
+ startAutoAwayTimer() {
1403
+ if (!this.autoAwayEnabled)
1404
+ return;
1405
+ interval(30000).subscribe({
1406
+ next: () => {
1407
+ const now = Date.now();
1408
+ const timeSinceActivity = now - this.lastActivityTime;
1409
+ if (timeSinceActivity > this.autoAwayTimeout &&
1410
+ this._userStatus().status === 'online') {
1411
+ this.setStatus('away', 'Auto-away due to inactivity');
1412
+ }
1413
+ }
1414
+ });
1415
+ }
1416
+ /**
1417
+ * Enable or disable auto-away functionality
1418
+ */
1419
+ setAutoAwayEnabled(enabled) {
1420
+ this.autoAwayEnabled = enabled;
1421
+ }
1422
+ /**
1423
+ * Set the auto-away timeout (in milliseconds)
1424
+ */
1425
+ setAutoAwayTimeout(timeout) {
1426
+ this.autoAwayTimeout = timeout;
1427
+ }
1428
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytUserStatusService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1429
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytUserStatusService, providedIn: 'root' }); }
1430
+ }
1431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytUserStatusService, decorators: [{
1432
+ type: Injectable,
1433
+ args: [{
1434
+ providedIn: 'root'
1435
+ }]
1436
+ }], ctorParameters: () => [] });
1437
+
1438
+ class CideLytSidebarWrapperComponent {
1439
+ // Add this getter to retrieve the menu tree for the selected module
1440
+ get selectedModuleMenus() {
1441
+ return this.core_system_menu || [];
1442
+ }
1443
+ /**
1444
+ * Gets the CSS classes for the user status indicator
1445
+ * Uses the injected user status service
1446
+ */
1447
+ getUserStatusClass() {
1448
+ return this.userStatusService.statusColor();
1449
+ }
1450
+ /**
1451
+ * Gets the tooltip text for the user status
1452
+ * Uses the injected user status service
1453
+ */
1454
+ getUserStatusText() {
1455
+ return this.userStatusService.statusText();
1456
+ }
1457
+ /**
1458
+ * Sets the user status (delegates to service)
1459
+ * @param status The new status to set
1460
+ * @param message Optional custom status message
1461
+ */
1462
+ setUserStatus(status, message) {
1463
+ this.userStatusService.setStatus(status, message);
1464
+ }
1465
+ /**
1466
+ * Gets the current user status data
1467
+ */
1468
+ get currentUserStatus() {
1469
+ return this.userStatusService.userStatus();
1470
+ }
1471
+ /**
1472
+ * Gets the icon for the currently active module
1473
+ * @returns The icon name for the active module or a default icon
1474
+ */
1475
+ getActiveModuleIcon() {
1476
+ if (this.core_system_module && this.core_system_module.length > 0 && this.activeModuleId) {
1477
+ const activeModule = this.core_system_module.find(m => m._id === this.activeModuleId);
1478
+ return activeModule?.syme_icon || 'dashboard';
1479
+ }
1480
+ return 'dashboard';
1481
+ }
1482
+ // Add a click handler for menu navigation
1483
+ onMenuClick(menu) {
1484
+ if (menu.syme_path) {
1485
+ // Check if this is an entity-related menu
1486
+ // Navigate to entity list component
1487
+ this.router.navigate([`/control-panel/${menu.syme_path}`]);
1488
+ // window.location.hash = menu.syme_path;
1489
+ }
1490
+ }
1491
+ /**
1492
+ * Toggle section expand/collapse state
1493
+ */
1494
+ toggleSection(sectionId) {
1495
+ this.expandedSections[sectionId] = !this.expandedSections[sectionId];
1496
+ console.log('📂 SIDEBAR: Section', sectionId, 'expanded:', this.expandedSections[sectionId]);
1497
+ }
1498
+ /**
1499
+ * Check if section is expanded
1500
+ */
1501
+ isSectionExpanded(sectionId) {
1502
+ return this.expandedSections[sectionId] ?? true; // Default to expanded
1503
+ }
1504
+ constructor() {
1505
+ this.sidebarSetupData = {
1506
+ cide_lyt_sidebar_width: 0
1507
+ };
1508
+ this.isCollapsed = false;
1509
+ this.darkMode = false;
1510
+ this.showUserMenu = false;
1511
+ this.showOptions = false;
1512
+ this.showNotifications = false;
1513
+ this.showNotificationsPanel = false;
1514
+ this.searchText = '';
1515
+ this.isExpanded = true;
1516
+ this.searchResults = [];
1517
+ // Collapsed section states tracking
1518
+ this.collapsedSections = {
1519
+ 'company': false,
1520
+ 'account': false,
1521
+ 'advanced': false,
1522
+ 'recent': false
1523
+ };
1524
+ // Track expanded state for menu sections
1525
+ this.expandedSections = {};
1526
+ // For scroll-based animation
1527
+ this.animateSections = [false, false, false, false, false];
1528
+ this.lastScrollTop = 0;
1529
+ this.scrolledPast = [false, false, false, false, false];
1530
+ this.core_system_menu = [];
1531
+ this.core_system_module = [];
1532
+ // Track active state for enhanced visual effects
1533
+ this.activeModuleId = '';
1534
+ this.hoverModuleId = '';
1535
+ this.animateItems = false;
1536
+ this.moduleLoadComplete = false;
1537
+ this.menuLoadComplete = false;
1538
+ this.loadingMenus = false;
1539
+ this.sidebarService = inject(CideLytSidebarService);
1540
+ this.elementRef = inject(ElementRef);
1541
+ this.appState = inject(AppStateHelperService);
1542
+ this.router = inject(Router);
1543
+ this.userStatusService = inject(CideLytUserStatusService);
1544
+ // React to active module changes using signal effects
1545
+ effect(() => {
1546
+ const activeModule = this.appState.activeModule();
1547
+ if (activeModule) {
1548
+ console.log('🔄 SIDEBAR: Active module signal changed:', activeModule.syme_title);
1549
+ // Update local state when active module changes
1550
+ this.activeModuleId = activeModule._id;
1551
+ // Always try to load menus when active module changes
1552
+ this.loadMenusForModule(activeModule);
1553
+ }
1554
+ });
1555
+ }
1556
+ ngOnInit() {
1557
+ // Modern ES2022+ pattern: Use Promise-based delays instead of nested setTimeout
1558
+ const initializeAnimations = async () => {
1559
+ await new Promise(resolve => setTimeout(resolve, 100));
1560
+ this.animateItems = true;
1561
+ await new Promise(resolve => setTimeout(resolve, 200));
1562
+ this.animateSections = [true, true, true, true, true];
1563
+ };
1564
+ initializeAnimations();
1565
+ // Get sidebar menu data with loading state tracking
1566
+ this.sidebarService?.getSidebarMenues({ syme_type: "module", sort: 'asc', syme_title: "" })?.subscribe({
1567
+ next: (res) => {
1568
+ this.core_system_module = res?.data || [];
1569
+ // Handle module initialization and active module setup
1570
+ if (this.core_system_module.length > 0) {
1571
+ const activeModule = this.appState.activeModule();
1572
+ console.log('🔍 SIDEBAR: Modules loaded. Current active module:', activeModule?.syme_title || 'none');
1573
+ console.log('📊 SIDEBAR: Available modules:', this.core_system_module.map(m => m.syme_title).join(', '));
1574
+ if (activeModule) {
1575
+ // Active module exists, verify it's in the loaded modules
1576
+ const foundModule = this.core_system_module.find(m => m._id === activeModule._id);
1577
+ if (foundModule) {
1578
+ console.log('✅ SIDEBAR: Active module found in loaded modules:', foundModule.syme_title);
1579
+ // The effect should have already triggered, but ensure menus are loaded
1580
+ if (this.core_system_menu.length === 0) {
1581
+ console.log('🔄 SIDEBAR: No menus loaded yet, triggering load for active module');
1582
+ this.loadMenusForModule(activeModule);
1583
+ }
1584
+ }
1585
+ else {
1586
+ console.log('⚠️ SIDEBAR: Active module not found in loaded modules, setting first as active');
1587
+ this.setActiveMenuByIndex(0);
1588
+ }
1589
+ }
1590
+ else {
1591
+ console.log('📌 SIDEBAR: No active module, setting first module as active');
1592
+ this.setActiveMenuByIndex(0);
1593
+ }
1594
+ }
1595
+ // Modern ES2022+ pattern: Use Promise-based delay
1596
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
1597
+ delay(300).then(() => {
1598
+ this.moduleLoadComplete = true;
1599
+ });
1600
+ },
1601
+ error: (err) => {
1602
+ console.error('Error loading sidebar modules:', err);
1603
+ this.moduleLoadComplete = true; // Set to true even on error to ensure UI is responsive
1604
+ }
1605
+ });
1606
+ // collecte the width of the sidebar by using the style property
1607
+ const cide_lyt_stack_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-stack-wrapper-width'));
1608
+ const cide_lyt_sidebar_menu_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidebar-menu-width'));
1609
+ this.sidebarSetupData.cide_lyt_sidebar_width = (cide_lyt_stack_wrapper_width + cide_lyt_sidebar_menu_width);
1610
+ }
1611
+ /**
1612
+ * Load menus for a specific module
1613
+ * @param module The module to load menus for
1614
+ */
1615
+ loadMenusForModule(module) {
1616
+ if (!module?._id) {
1617
+ console.warn('🚫 SIDEBAR: Cannot load menus - no module ID provided');
1618
+ return;
1619
+ }
1620
+ console.log('📂 SIDEBAR: Loading menus for module:', module.syme_title, 'ID:', module._id);
1621
+ this.loadingMenus = true;
1622
+ this.menuLoadComplete = false;
1623
+ // Fetch menus for the selected module
1624
+ this.sidebarService?.getSidebarMenues({
1625
+ syme_id: module._id,
1626
+ sort: 'asc'
1627
+ })?.subscribe({
1628
+ next: (res) => {
1629
+ const menus = res?.data || [];
1630
+ this.core_system_menu = menus;
1631
+ this.loadingMenus = false;
1632
+ console.log('✅ SIDEBAR: Loaded', menus, 'menus for module:', module.syme_title);
1633
+ console.log('📋 SIDEBAR: Menu titles:', menus.map(m => m.syme_title).join(', '));
1634
+ // Modern ES2022+ pattern: Use Promise-based delay
1635
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
1636
+ delay(200).then(() => {
1637
+ this.menuLoadComplete = true;
1638
+ console.log('🎯 SIDEBAR: Menu loading complete for:', module.syme_title);
1639
+ });
1640
+ },
1641
+ error: (err) => {
1642
+ console.error('❌ SIDEBAR: Error loading menus for module:', module.syme_title, err);
1643
+ this.core_system_menu = [];
1644
+ this.loadingMenus = false;
1645
+ this.menuLoadComplete = true;
1646
+ }
1647
+ });
1648
+ }
1649
+ toggleSidebar() {
1650
+ this.isCollapsed = !this.isCollapsed;
1651
+ // Add animation class
1652
+ const sidebarElement = this.elementRef.nativeElement.querySelector('.cide-lyt-sidebar');
1653
+ sidebarElement.classList.add('animating');
1654
+ // Remove animation class after animation completes
1655
+ // Modern ES2022+ pattern: Use Promise-based delay
1656
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
1657
+ delay(300).then(() => {
1658
+ sidebarElement.classList.remove('animating');
1659
+ });
1660
+ // this.sidebarService.toggleSidebar();
1661
+ }
1662
+ toggleUserMenu() {
1663
+ this.showUserMenu = !this.showUserMenu;
1664
+ // Close other menus if open
1665
+ if (this.showUserMenu) {
1666
+ this.showOptions = false;
1667
+ this.showNotifications = false;
1668
+ }
1669
+ // Add subtle animation when opening menu
1670
+ if (this.showUserMenu) {
1671
+ this.animateMenuOpen('user-menu');
1672
+ }
1673
+ }
1674
+ /**
1675
+ * Sets the active menu item with animation
1676
+ * @param moduleId The ID of the module to set as active
1677
+ */
1678
+ setActiveMenu(moduleId) {
1679
+ if (this.activeModuleId === moduleId)
1680
+ return;
1681
+ // Set the active module in app state - the effect will handle local state updates
1682
+ const selectedModule = this.core_system_module.find(m => m._id === moduleId);
1683
+ if (selectedModule) {
1684
+ this.appState.setActiveModule(selectedModule);
1685
+ // The effect will automatically update this.activeModuleId and load menus
1686
+ }
1687
+ // You could trigger custom animations here
1688
+ }
1689
+ /**
1690
+ * Sets the active menu item by index with animation
1691
+ * @param index The index of the menu item
1692
+ */
1693
+ setActiveMenuByIndex(index) {
1694
+ const selectedModule = this.core_system_module[index];
1695
+ if (selectedModule) {
1696
+ this.appState.setActiveModule(selectedModule);
1697
+ // The effect will automatically update this.activeModuleId and load menus
1698
+ }
1699
+ }
1700
+ /**
1701
+ * Public method to set active module by ID from external components
1702
+ * This is useful when you want to programmatically set the active module
1703
+ * @param moduleId The ID of the module to set as active
1704
+ * @returns boolean indicating if the module was found and set as active
1705
+ */
1706
+ setActiveModuleById(moduleId) {
1707
+ const module = this.core_system_module.find(m => m._id === moduleId);
1708
+ if (module) {
1709
+ this.setActiveMenu(moduleId);
1710
+ return true;
1711
+ }
1712
+ console.warn(`Module with ID "${moduleId}" not found in sidebar modules`);
1713
+ return false;
1714
+ }
1715
+ /**
1716
+ * Public method to get the currently active module ID
1717
+ * @returns The ID of the currently active module, or empty string if none
1718
+ */
1719
+ getActiveModuleId() {
1720
+ return this.activeModuleId;
1721
+ }
1722
+ /**
1723
+ * Tracks hover state for enhanced visual feedback
1724
+ * @param moduleId The ID of the hovered module, or empty string for none
1725
+ */
1726
+ onItemHover(moduleId) {
1727
+ this.hoverModuleId = moduleId;
1728
+ }
1729
+ /**
1730
+ * Adds subtle animations when opening dropdown menus
1731
+ * @param menuId The ID of the menu element
1732
+ */
1733
+ animateMenuOpen(menuId) {
1734
+ const menuElement = this.elementRef.nativeElement.querySelector(`.${menuId}`);
1735
+ if (!menuElement)
1736
+ return;
1737
+ // First set initial state
1738
+ menuElement.style.opacity = '0';
1739
+ menuElement.style.transform = 'translateY(-8px) scale(0.95)';
1740
+ // Then animate to final state
1741
+ setTimeout(() => {
1742
+ menuElement.style.transition = 'opacity 0.2s ease, transform 0.2s ease';
1743
+ menuElement.style.opacity = '1';
1744
+ menuElement.style.transform = 'translateY(0) scale(1)';
1745
+ }, 10);
1746
+ }
1747
+ /**
1748
+ * Updates tooltip position for more accurate placement
1749
+ * @param event MouseEvent from hovering
1750
+ * @param tooltip The tooltip element
1751
+ */
1752
+ updateTooltipPosition(event, tooltipIndex) {
1753
+ const tooltip = this.elementRef.nativeElement.querySelectorAll('.nav-tooltip')[tooltipIndex];
1754
+ if (!tooltip)
1755
+ return;
1756
+ // Get the vertical position of the cursor
1757
+ const cursorY = event.clientY;
1758
+ // Set the tooltip position to match the cursor Y position
1759
+ tooltip.style.top = `${cursorY}px`;
1760
+ // Add a slight animation
1761
+ tooltip.style.transition = 'opacity 0.2s ease, transform 0.2s ease';
1762
+ tooltip.style.transform = 'translateY(-50%)';
1763
+ }
1764
+ toggleNotificationsPanel() {
1765
+ this.showNotificationsPanel = !this.showNotificationsPanel;
1766
+ this.showNotifications = this.showNotificationsPanel;
1767
+ // Close other menus if open
1768
+ if (this.showNotificationsPanel) {
1769
+ this.showUserMenu = false;
1770
+ this.showOptions = false;
1771
+ }
1772
+ // Add animation when opening panel
1773
+ if (this.showNotificationsPanel) {
1774
+ this.animateMenuOpen('notifications-panel');
1775
+ }
1776
+ }
1777
+ toggleTheme() {
1778
+ this.darkMode = !this.darkMode;
1779
+ // Add dark mode class to sidebar element
1780
+ const sidebarElement = this.elementRef.nativeElement.querySelector('.cide-lyt-sidebar');
1781
+ if (this.darkMode) {
1782
+ sidebarElement.classList.add('dark-mode');
1783
+ }
1784
+ else {
1785
+ sidebarElement.classList.remove('dark-mode');
1786
+ }
1787
+ }
1788
+ toggleOptions() {
1789
+ this.showOptions = !this.showOptions;
1790
+ // Close other menus if open
1791
+ if (this.showOptions) {
1792
+ this.showUserMenu = false;
1793
+ this.showNotifications = false;
1794
+ }
1795
+ // Add subtle animation when opening menu
1796
+ if (this.showOptions) {
1797
+ this.animateMenuOpen('options-menu');
1798
+ }
1799
+ }
1800
+ /**
1801
+ * Toggle old-style collapsed sections (for backwards compatibility)
1802
+ */
1803
+ toggleCollapsedSection(section) {
1804
+ this.collapsedSections[section] = !this.collapsedSections[section];
1805
+ }
1806
+ isSectionCollapsed(section) {
1807
+ return this.collapsedSections[section];
1808
+ }
1809
+ onSearch() {
1810
+ // Reset animation trigger when searching
1811
+ this.resetAnimations();
1812
+ // Mock search functionality - would be integrated with actual search service
1813
+ if (this.searchText.trim() === '') {
1814
+ this.searchResults = [];
1815
+ return;
1816
+ }
1817
+ // Example search results - would come from actual data source
1818
+ const allItems = [
1819
+ { icon: 'settings', title: 'General Settings' },
1820
+ { icon: 'payments', title: 'Billing & Payments' },
1821
+ { icon: 'shield', title: 'Security Settings' },
1822
+ { icon: 'person', title: 'Profile Settings' },
1823
+ { icon: 'notifications', title: 'Notification Preferences' },
1824
+ { icon: 'integration_instructions', title: 'API Integrations' },
1825
+ { icon: 'key', title: 'API Keys' },
1826
+ { icon: 'groups', title: 'Team Members' },
1827
+ { icon: 'devices', title: 'Connected Devices' },
1828
+ { icon: 'language', title: 'Language Settings' },
1829
+ ];
1830
+ // Simple text search on title
1831
+ this.searchResults = allItems.filter(item => item.title.toLowerCase().includes(this.searchText.toLowerCase()));
1832
+ }
1833
+ onScroll(event) {
1834
+ const scrollTop = event.target.scrollTop;
1835
+ const sections = this.elementRef.nativeElement.querySelectorAll('.sidebar-section');
1836
+ // Reset animations if scrolling back to top
1837
+ if (scrollTop < 10) {
1838
+ this.resetAnimations();
1839
+ return;
1840
+ }
1841
+ // Animate sections as they come into view
1842
+ sections.forEach((section, index) => {
1843
+ if (index >= this.animateSections.length)
1844
+ return;
1845
+ const sectionTop = section.offsetTop;
1846
+ const scrollPosition = scrollTop + 300; // Offset to trigger animation before fully visible
1847
+ // When scrolling down and section comes into view
1848
+ if (scrollPosition > sectionTop && !this.scrolledPast[index] && scrollTop > this.lastScrollTop) {
1849
+ this.animateSections[index] = true;
1850
+ this.scrolledPast[index] = true;
1851
+ }
1852
+ // When scrolling up to top, reset animation
1853
+ if (scrollTop < 50 && this.lastScrollTop > scrollTop) {
1854
+ this.resetAnimations();
1855
+ }
1856
+ });
1857
+ this.lastScrollTop = scrollTop;
1858
+ }
1859
+ resetAnimations() {
1860
+ this.animateSections = [false, false, false, false, false];
1861
+ this.scrolledPast = [false, false, false, false, false];
1862
+ // Re-trigger animations
1863
+ setTimeout(() => {
1864
+ this.animateSections = [true, true, true, true, true];
1865
+ }, 50);
1866
+ }
1867
+ onDocumentClick(event) {
1868
+ // Close dropdown menus when clicking outside
1869
+ const clickedInside = this.elementRef.nativeElement.contains(event.target);
1870
+ if (!clickedInside) {
1871
+ this.showUserMenu = false;
1872
+ this.showOptions = false;
1873
+ }
1874
+ }
1875
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidebarWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1876
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: CideLytSidebarWrapperComponent, isStandalone: true, selector: "cide-lyt-sidebar-wrapper", host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<nav class=\"cide-lyt-sidebar tw-flex tw-h-full tw-select-none\" [class.collapsed]=\"isCollapsed\">\n <!-- First tier sidebar (Icon only) -->\n <div class=\"cide-lyt-stack tw-h-full tw-flex tw-flex-col tw-items-center tw-border-r tw-border-gray-100\">\n <!-- Scrollable content -->\n <div class=\"sidebar-scroll-content\">\n <!-- Collapse/Expand toggle -->\n <div class=\"nav-item collapse-toggle\" tabindex=\"0\" (click)=\"toggleSidebar()\"\n (keydown.enter)=\"toggleSidebar()\">\n <div class=\"nav-tooltip\">{{isCollapsed ? 'Expand' : 'Collapse'}} Sidebar</div>\n <cide-ele-icon size=\"xs\" type=\"box\" class=\"tw-text-gray-500 hover:tw-text-gray-700\">\n {{isCollapsed ? 'chevron_right' : 'chevron_left'}}\n </cide-ele-icon>\n </div> <!-- Main navigation icons - Enhanced Design -->\n <div class=\"tw-flex tw-flex-col tw-gap-4\">\n @for (core_system_module_item of core_system_module; track $index) {\n <div class=\"nav-item tw-relative tw-group\" (click)=\"setActiveMenu(core_system_module_item._id)\"\n [cideEleTooltip]=\"core_system_module_item.syme_title\" [tooltipShowArrow]=\"true\"\n tooltipPlacement=\"right\"\n [ngClass]=\"{'nav-item-active': activeModuleId === core_system_module_item._id}\"\n (mouseenter)=\"onItemHover(core_system_module_item._id)\" (mouseleave)=\"onItemHover('')\"\n [tabindex]=\"$index\" (keydown.enter)=\"setActiveMenu(core_system_module_item._id)\">\n\n <!-- Notification Badge with enhanced design -->\n @if (core_system_module_item?.syme_ping) {\n <div class=\"nav-badge tw-absolute -tw-top-1 -tw-right-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-animate-ping\"\n style=\"background-color: var(--cide-theme-error-color);\">\n </div>\n }\n\n <!-- Enhanced icon with better visual effects -->\n <div\n class=\"tw-p-2 tw-rounded-xl tw-transition-all tw-duration-200 tw-ease-in-out\n group-hover:tw-bg-blue-50 group-hover:tw-shadow-md group-hover:tw-scale-105\n tw-border-2 tw-border-transparent\n {{activeModuleId === core_system_module_item._id ? 'tw-bg-blue-100 tw-border-blue-200 tw-shadow-sm' : 'tw-bg-gray-50'}}\">\n <cide-ele-icon type=\"box\" size=\"xs\"\n class=\"tw-transition-all tw-duration-200 tw-ease-in-out\n {{activeModuleId === core_system_module_item._id ? 'tw-text-blue-600' : 'tw-text-gray-600 group-hover:tw-text-blue-500'}}\">\n {{core_system_module_item?.syme_icon || 'dashboard'}}\n </cide-ele-icon>\n </div>\n\n <!-- Modern active indicator -->\n @if (activeModuleId === core_system_module_item._id) {\n <div\n class=\"nav-indicator tw-absolute tw-left-0 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-w-1 tw-h-8 tw-bg-blue-500 tw-rounded-r-full tw-shadow-lg tw-transition-all tw-duration-300\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Bottom section with enhanced theme toggle and user avatar -->\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-3 tw-mt-auto tw-pb-4\">\n <!-- Theme toggle with modern design -->\n <div class=\"nav-item tw-group\">\n <div class=\"nav-tooltip\">Toggle Theme</div>\n <button class=\"theme-toggle\" (click)=\"toggleTheme()\" (keydown.enter)=\"toggleTheme()\"\n (keydown.space)=\"toggleTheme()\" tabindex=\"0\" role=\"button\" aria-label=\"Toggle theme\">\n <cide-ele-icon type=\"box\" size=\"sm\">\n {{darkMode ? 'light_mode' : 'dark_mode'}}\n </cide-ele-icon>\n </button>\n </div>\n\n <!-- User avatar with dropdown -->\n <div class=\"tw-relative user-dropdown\" \n (click)=\"toggleUserMenu()\"\n (keydown.enter)=\"toggleUserMenu()\"\n (keydown.space)=\"toggleUserMenu()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Toggle user menu\"\n [attr.aria-expanded]=\"showUserMenu\">\n <div class=\"nav-tooltip\">Your Profile</div>\n <div class=\"user-avatar tw-w-10 tw-h-10 tw-rounded-full tw-overflow-hidden tw-bg-gray-200 tw-border-2 tw-shadow-sm tw-cursor-pointer hover:tw-shadow\"\n style=\"border-color: var(--cide-theme-sidebar-color);\">\n <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADACAMAAAB/Pny7AAAA8FBMVEX///8Qdv8QUuf///0QUegNdP////sAcv8Ab/8Abf/M4vASX+8Ab/3n7vgAbvgETufR4PP0//sAaf0ASeU6YuMyW+fe8PcAafbC1velwfGWufCOsvL1/P3u9vh7qfh3pvgARucRWOu10vBglOmnxuw0fOValuYAbOdYk/EAYPgAZ+o9hPJMi+TH3/duoONwnuwdefe0yvRunfZ6pe1LiOk6gfuRu+y11eurvuU3YtmRpuCitOO7xuvG1OlJjPYdc+iNnOFOcOFceOJlg93Jz+wANt6kte58kNp1kOgAQMkZOdQOTNUAKNkfU9FMb9I9Zs4gMZ6mAAAPKUlEQVR4nO1dC1fiuhZum6ZFoA+sFIH2TAUclQ6KgzoKPlB08Dgz3v//b26StohjH0la1LMW39KjI5yGr/uRnb13E0FYY4011lhjjTXWWGONNdbgBgi+AfkG+Af5JXxl8QP9BYAP+oj0AITDCxnl1b+E5X98fjLBxwXRpwWOa9smgW27DpFQ+Mp/gQthowhCrdxpjbon/inCkHydnu6edEetTrmG3qb8FyRDbrrdO9zVdRGKIkRQYQhVxb+Kur572LPBwoo+HxAJBYtEsXtf9yqbVVUUMZkElDYre197NpajsOwdPg2Q3rj2mV85QLc/kcULYHWz75/ZrvAZTQi4ZvMEiYSGSAR1s/KtabpYOsqnIYM+jbY92ttUg3tOyYe8T93cG21riqB8NAchcsSK2dzXNyAxElrJwOitcEPfb5r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Lsrp6UtJFYzCaKGAzrmW5/1NXQ6fkJM44qMdAJuucs+WKSu3GFE8FaUmv5eimOEFMsgO3euB1rLLuJrIANAPhkQFVcfj58ebVGCcu7nZpJa+13ohOkojGdmJCAmo3sebfjoMHvI88GJIyQYyNHUL6Zd7LZkAWOZ939NAFjf+eqAP46HPTFpWXMnvhF7+HX/FJTiszy5ULYXh4c26ouccmKOmXL+/08CY5t/SxkwrZs9F/XbvmNzY3AFxA3oOPbH0vI8B4eLsaaC1LPEPhgBEcdl6IjgtUl65CCqVGWMZF/Zz37HVZfeRCkj/Eh1KIenHBUIlmZpfyMZDxdzM9xAAYyN6f4YCz8a3g8+K5/Q/JlCFsXt8+z+fi87ArhkycrXuHnRrSiCicMfHC7eYVhmrYWZY1f5sZPzSVMc4VMwkdlFq8sfv/AM4DXWGONNdZYY4011lhjjTU+I/4P0EdBunobKkUAAAAASUVORK5CYII=\"\n alt=\"User\" class=\"tw-w-full tw-h-full tw-object-cover\"\n onerror=\"this.src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADACAMAAAB/Pny7AAAA8FBMVEX///8Qdv8QUuf///0QUegNdP////sAcv8Ab/8Abf/M4vASX+8Ab/3n7vgAbvgETufR4PP0//sAaf0ASeU6YuMyW+fe8PcAafbC1velwfGWufCOsvL1/P3u9vh7qfh3pvgARucRWOu10vBglOmnxuw0fOValuYAbOdYk/EAYPgAZ+o9hPJMi+TH3/duoONwnuwdefe0yvRunfZ6pe1LiOk6gfuRu+y11eurvuU3YtmRpuCitOO7xuvG1OlJjPYdc+iNnOFOcOFceOJlg93Jz+wANt6kte58kNp1kOgAQMkZOdQOTNUAKNkfU9FMb9I9Zs4gMZ6mAAAPKUlEQVR4nO1dC1fiuhZum6ZFoA+sFIH2TAUclQ6KgzoKPlB08Dgz3v//b26StohjH0la1LMW39KjI5yGr/uRnb13E0FYY4011lhjjTXWWGONNdbgBgi+AfkG+Af5JXxl8QP9BYAP+oj0AITDCxnl1b+E5X98fjL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mD4jGrK0VAh7/YOaDZILWsIoq9x+GtS+ppxkBHdY6sapMKyZoxS8UesbKA7esD0pGNB3iqEiGdIcKKs/hyLYSj/BCyz7tDyw6mMHFLRzZhoXFHSmHXKg87dgLiB7F+dOUnhXMBkABvvJhqPnthvZer4PQ9JVqxmGkngwCAxjgRx0DGteYM43E4Ac2ZKYF6jyywb9b9a/5+96ZIuQfJgOjNhwcpEfLvh3yuImgybQs0pMqjOIBXgkg5XTepqEa7d3hgLsrp6UtJFYzCaKGAzrmW5/1NXQ6fkJM44qMdAJuucs+WKSu3GFE8FaUmv5eimOEFMsgO3euB1rLLuJrIANAPhkQFVcfj58ebVGCcu7nZpJa+13ohOkojGdmJCAmo3sebfjoMHvI88GJIyQYyNHUL6Zd7LZkAWOZ939NAFjf+eqAP46HPTFpWXMnvhF7+HX/FJTiszy5ULYXh4c26ouccmKOmXL+/08CY5t/SxkwrZs9F/XbvmNzY3AFxA3oOPbH0vI8B4eLsaaC1LPEPhgBEcdl6IjgtUl65CCqVGWMZF/Zz37HVZfeRCkj/Eh1KIenHBUIlmZpfyMZDxdzM9xAAYyN6f4YCz8a3g8+K5/Q/JlCFsXt8+z+fi87ArhkycrXuHnRrSiCicMfHC7eYVhmrYWZY1f5sZPzSVMc4VMwkdlFq8sfv/AM4DXWGONNdZYY4011lhjjTU+I/4P0EdBunobKkUAAAAASUVORK5CYII='\">\n <!-- Modern Status Indicator Circle -->\n <div class=\"tw-absolute -tw-bottom-0.5 -tw-right-0.5 tw-w-3.5 tw-h-3.5 tw-rounded-full tw-border-2 tw-border-white tw-shadow-sm tw-transition-all tw-duration-200\n {{getUserStatusClass()}}\" [cideEleTooltip]=\"getUserStatusText()\"\n tooltipPlacement=\"left\">\n <!-- Pulse animation for active status -->\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-animate-pulse tw-opacity-50\n {{getUserStatusClass()}}\"></div>\n </div>\n </div>\n\n <!-- Enhanced User dropdown menu with modern status options -->\n <div *ngIf=\"showUserMenu\"\n class=\"user-menu tw-absolute tw-left-full tw-bottom-0 tw-mt-2 tw-ml-2 tw-w-72 tw-rounded-xl tw-shadow-2xl tw-bg-white tw-ring-1 tw-ring-black/5 tw-divide-y tw-divide-gray-100 tw-z-50 tw-backdrop-blur-sm\">\n\n <!-- Enhanced User Info Section -->\n <div class=\"tw-p-5 tw-bg-gradient-to-br tw-from-blue-50 tw-to-indigo-50\">\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <div class=\"tw-relative\">\n <div\n class=\"tw-w-12 tw-h-12 tw-rounded-xl tw-bg-gradient-to-br tw-from-blue-500 tw-via-purple-500 tw-to-indigo-600 tw-flex tw-items-center tw-justify-center tw-text-white tw-font-semibold tw-text-lg tw-shadow-lg\">\n JD\n </div>\n <!-- Enhanced status indicator -->\n <div class=\"tw-absolute -tw-bottom-1 -tw-right-1 tw-w-4 tw-h-4 tw-rounded-full tw-border-2 tw-border-white tw-shadow-md tw-transition-all tw-duration-300\"\n [class]=\"getUserStatusClass()\" [title]=\"getUserStatusText()\">\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-animate-pulse tw-opacity-50\"\n [class]=\"getUserStatusClass()\"></div>\n </div>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <div class=\"tw-text-base tw-font-semibold tw-text-gray-900 tw-truncate\">John Doe</div>\n <div class=\"tw-text-sm tw-text-gray-600 tw-truncate\">john.doe&#64;company.com</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1 tw-flex tw-items-center tw-gap-1\">\n <div class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-500 tw-animate-pulse\">\n </div>\n <span>Active now</span>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Enhanced Status Selection Section -->\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-5 tw-h-5 tw-rounded-md tw-bg-blue-100 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon type=\"none\" size=\"2xs\"\n class=\"tw-text-blue-600\">radio_button_checked</cide-ele-icon>\n </div>\n Set Status\n </h4>\n <span\n class=\"tw-text-xs tw-text-gray-500 tw-bg-gray-100 tw-px-2 tw-py-1 tw-rounded-full\">Auto-away\n in 5min</span>\n </div>\n\n <div class=\"tw-space-y-1\">\n <button (click)=\"setUserStatus('online')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-green-50 tw-group\"\n [class.tw-bg-green-50]=\"userStatusService.userStatus().status === 'online'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'online'\"\n [class.tw-ring-green-200]=\"userStatusService.userStatus().status === 'online'\">\n <div class=\"tw-relative\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-green-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-bg-green-500 tw-animate-ping tw-opacity-75\"\n *ngIf=\"userStatusService.userStatus().status === 'online'\"></div>\n </div>\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Online</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'online'\" type=\"none\"\n size=\"xs\" class=\"tw-text-green-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('away')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-yellow-50 tw-group\"\n [class.tw-bg-yellow-50]=\"userStatusService.userStatus().status === 'away'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'away'\"\n [class.tw-ring-yellow-200]=\"userStatusService.userStatus().status === 'away'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-yellow-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Away</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'away'\" type=\"none\"\n size=\"xs\" class=\"tw-text-yellow-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('busy')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-orange-50 tw-group\"\n [class.tw-bg-orange-50]=\"userStatusService.userStatus().status === 'busy'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'busy'\"\n [class.tw-ring-orange-200]=\"userStatusService.userStatus().status === 'busy'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-orange-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Busy</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'busy'\" type=\"none\"\n size=\"xs\" class=\"tw-text-orange-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('do-not-disturb')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-red-50 tw-group\"\n [class.tw-bg-red-50]=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n [class.tw-ring-red-200]=\"userStatusService.userStatus().status === 'do-not-disturb'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-red-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Do not disturb</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n type=\"none\" size=\"xs\" class=\"tw-text-red-600\">check</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Enhanced Quick Actions Section -->\n <div class=\"tw-p-4 tw-bg-gray-50/50\">\n <h4\n class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3 tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-5 tw-h-5 tw-rounded-md tw-bg-gray-100 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon type=\"none\" size=\"2xs\" class=\"tw-text-gray-600\">bolt</cide-ele-icon>\n </div>\n Quick Actions\n </h4>\n <div class=\"tw-space-y-1\">\n <a href=\"#\"\n class=\"quick-action tw-group tw-flex tw-items-center tw-px-3 tw-py-2 tw-text-sm tw-text-gray-700 tw-rounded-lg hover:tw-bg-white tw-transition-all tw-duration-200\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-blue-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-blue-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-text-blue-600\">person</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">View Profile</span>\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-400 group-hover:tw-text-gray-600 tw-transition-colors\">chevron_right</cide-ele-icon>\n </a>\n <a href=\"#\"\n class=\"quick-action tw-group tw-flex tw-items-center tw-px-3 tw-py-2 tw-text-sm tw-text-gray-700 tw-rounded-lg hover:tw-bg-white tw-transition-all tw-duration-200\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-gray-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-gray-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-600\">settings</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">Preferences</span>\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-400 group-hover:tw-text-gray-600 tw-transition-colors\">chevron_right</cide-ele-icon>\n </a>\n </div>\n </div>\n\n <!-- Enhanced Sign Out Section -->\n <div class=\"tw-p-4\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-3 tw-py-2.5 tw-text-sm tw-text-red-600 tw-rounded-lg hover:tw-bg-red-50 tw-transition-all tw-duration-200 tw-font-medium\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-red-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-red-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-text-red-600\">logout</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">Sign out</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div> <!-- Second tier sidebar (Expanded view) -->\n <div class=\"cide-lyt-sidebar-menu tw-h-full tw-overflow-hidden tw-shadow-sm\">\n <div class=\"tw-flex tw-flex-col tw-h-full\">\n <!-- Header section with search and options -->\n <div class=\"sidebar-header tw-p-4 tw-border-b tw-border-gray-100\">\n <!-- Title with back button - Clean layout without online indicator -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-mb-4\">\n <button\n class=\"back-button tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors tw-flex-shrink-0\"\n [cideEleTooltip]=\"'Back to home'\" tooltipPlacement=\"bottom\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-transition-transform hover:tw-scale-110\">{{\n getActiveModuleIcon() }}</cide-ele-icon>\n </button>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h2 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-leading-5\">\n {{ appState.getActiveModuleTitle() || 'Menu' }}\n </h2>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-mt-0.5\">\n Module Dashboard\n </p>\n </div>\n </div>\n\n <!-- Search and options -->\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"search-wrapper tw-relative tw-flex-1\">\n <cide-ele-input type=\"text\" leadingIcon=\"search\" size=\"xs\" placeholder=\"Search settings...\"\n [clearInput]=\"true\" [(ngModel)]=\"searchText\" (input)=\"onSearch()\">\n </cide-ele-input>\n <div\n class=\"search-shortcut tw-absolute tw-right-3 tw-top-1/2 -tw-translate-y-1/2 tw-bg-gray-100 tw-text-gray-500 tw-rounded tw-px-1.5 tw-py-0.5 tw-text-xs\">\n \u2318K</div>\n </div>\n <button\n class=\"tw-ml-2 tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors\"\n (click)=\"toggleOptions()\">\n <cide-ele-icon type=\"none\" size=\"xs\">more_vert</cide-ele-icon>\n </button>\n\n <!-- Options dropdown menu -->\n <div *ngIf=\"showOptions\"\n class=\"options-menu tw-absolute tw-right-4 tw-top-16 tw-mt-2 tw-w-48 tw-rounded-md tw-shadow-lg tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-divide-y tw-divide-gray-100 tw-z-10\">\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">refresh</cide-ele-icon>\n Refresh\n </a>\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">sync</cide-ele-icon>\n Sync settings\n </a>\n </div>\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">help_outline</cide-ele-icon>\n Help & support\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Menu items with categories -->\n <div class=\"sidebar-content tw-overflow-y-auto tw-flex-1\" (scroll)=\"onScroll($event)\">\n <!-- Search results if searching -->\n <div *ngIf=\"searchText\" class=\"sidebar-section tw-p-4\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500\">SEARCH RESULTS</h3>\n <span class=\"tw-text-xs tw-text-gray-500\">{{searchResults.length}} items</span>\n </div>\n\n <div *ngIf=\"searchResults.length > 0\" class=\"tw-space-y-1\">\n <a *ngFor=\"let item of searchResults\" href=\"#\"\n class=\"menu-item tw-flex tw-items-center tw-px-3 tw-py-2 tw-rounded-md hover:tw-bg-gray-50\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{item.icon}}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{item.title}}</span>\n </a>\n </div>\n\n <div *ngIf=\"searchResults.length === 0\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">search_off</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No results for \"{{searchText}}\"</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Try another search term</p>\n </div>\n </div>\n\n <!-- Only show these sections if not searching -->\n <ng-container *ngIf=\"!searchText\">\n <!-- Loading state -->\n <div *ngIf=\"loadingMenus\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-spinner variant=\"circle\" size=\"xs\"></cide-ele-spinner>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">Loading menus...</p>\n </div>\n\n <!-- Dynamic menu tree -->\n <div *ngIf=\"!loadingMenus && menuLoadComplete\" class=\"sidebar-section tw-p-4\"\n [class.animate-in]=\"animateSections[0]\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: selectedModuleMenus, level: 0}\"></ng-container>\n </div>\n\n <!-- Empty state -->\n <div *ngIf=\"!loadingMenus && menuLoadComplete && selectedModuleMenus.length === 0\"\n class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">folder_open</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No menus available</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Select a module to view its menus</p>\n </div>\n </ng-container>\n\n <!-- Recursive menu template -->\n <ng-template #recursiveMenu let-menus let-level=\"level\">\n <div [class.tw-ml-0]=\"level > 0\">\n <div *ngFor=\"let menu of menus\" class=\"tw-mb-2\">\n <!-- Title type items (section headers) -->\n <div *ngIf=\"menu.syme_type === 'title'\" class=\"tw-mb-3\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500 tw-uppercase tw-mb-2\">{{\n menu.syme_title }}</h3>\n <!-- Render children of title -->\n <ng-container *ngIf=\"menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n\n <!-- Section type items (collapsible sections) -->\n <div *ngIf=\"menu.syme_type === 'section'\" class=\"tw-mb-2\">\n <!-- Section header (clickable to expand/collapse) -->\n <button \n (click)=\"toggleSection(menu._id)\"\n (keydown.enter)=\"toggleSection(menu._id)\"\n (keydown.space)=\"toggleSection(menu._id)\"\n class=\"section-header tw-w-full tw-flex tw-items-center tw-px-3 tw-py-2 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors tw-text-left\"\n [class.tw-bg-blue-50]=\"isSectionExpanded(menu._id)\"\n type=\"button\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"isSectionExpanded(menu._id)\"\n [attr.aria-label]=\"'Toggle ' + menu.syme_title + ' section'\">\n \n <!-- Section Icon (left side, like other menu items) -->\n <cide-ele-icon \n class=\"tw-mr-3 tw-text-gray-500\" \n type=\"none\"\n size=\"xs\">{{ menu.syme_icon || 'folder' }}</cide-ele-icon>\n \n <!-- Section Title -->\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-800\">{{ menu.syme_title }}</span>\n \n <!-- Right side icons container -->\n <div class=\"tw-ml-auto tw-flex tw-items-center tw-space-x-2\">\n <!-- Child Count Badge -->\n <span \n *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-px-2 tw-py-0.5 tw-bg-gray-200 tw-text-gray-600 tw-rounded-full tw-text-xs tw-font-medium\">\n {{ menu.children.length }}\n </span>\n \n <!-- Expand/Collapse Icon (right side) -->\n <cide-ele-icon \n class=\"tw-text-gray-400 tw-transition-transform tw-duration-200\"\n [class.tw-rotate-90]=\"isSectionExpanded(menu._id)\"\n type=\"none\" \n size=\"2xs\">chevron_right</cide-ele-icon>\n </div>\n </button>\n\n <!-- Section Content (collapsible) -->\n <div \n *ngIf=\"isSectionExpanded(menu._id) && menu.children && menu.children.length > 0\"\n class=\"section-content tw-mt-2 tw-ml-2 tw-border-l tw-border-gray-200 tw-pl-3\"\n [@slideInOut]=\"isSectionExpanded(menu._id) ? 'in' : 'out'\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </div>\n </div>\n\n <!-- Menu type items (clickable links) -->\n <a *ngIf=\"menu.syme_type === 'menu'\" (click)=\"onMenuClick(menu)\"\n (keydown.enter)=\"onMenuClick(menu)\" (keydown.space)=\"onMenuClick(menu)\" tabindex=\"0\"\n role=\"button\"\n class=\"menu-item tw-flex tw-items-center tw-px-1 tw-py-1 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors\">\n <cide-ele-icon *ngIf=\"menu.syme_icon\" class=\"tw-mr-3 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{ menu.syme_icon }}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{ menu.syme_title }}</span>\n <cide-ele-icon *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-ml-auto tw-text-gray-400\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </a>\n\n <!-- Render nested children for menu items -->\n <ng-container\n *ngIf=\"menu.syme_type === 'menu' && menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Notification panel (overlays content when shown) -->\n <div *ngIf=\"showNotifications\" class=\"notification-panel tw-absolute tw-inset-0 tw-bg-white tw-z-20\">\n <div class=\"tw-p-4 tw-border-b tw-border-gray-100 tw-flex tw-justify-between tw-items-center\">\n <h3 class=\"tw-text-sm tw-font-medium\">Notifications</h3>\n <button class=\"tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100\"\n (click)=\"toggleNotificationsPanel()\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <div class=\"tw-text-xs tw-text-gray-500\">Today</div>\n <button class=\"tw-text-xs tw-text-blue-500\">Mark all as read</button>\n </div>\n\n <div class=\"tw-space-y-3\">\n <div\n class=\"notification-item tw-p-3 tw-bg-blue-50 tw-rounded-lg tw-border-l-4 tw-border-blue-500\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-flex tw-items-center tw-justify-center tw-text-blue-500\">\n <cide-ele-icon type=\"none\" size=\"xs\">notifications</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">New feature available</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">Try our new analytics dashboard\n with improved visualizations.</div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">Just now</div>\n </div>\n </div>\n </div>\n\n <div class=\"notification-item tw-p-3 tw-rounded-lg tw-border-l-4 tw-border-transparent\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-gray-100 tw-flex tw-items-center tw-justify-center tw-text-gray-500\">\n <cide-ele-icon type=\"none\" size=\"xs\">person_add</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">New team member</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">Jane Smith has joined your team.\n </div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">2 hours ago</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Storage info at bottom -->\n <div class=\"sidebar-footer tw-p-4 tw-border-t tw-border-gray-100\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-icon class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">cloud_upload</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">Storage</span>\n </div>\n <button\n class=\"upgrade-button tw-text-xs tw-text-blue-500 tw-font-medium tw-px-2 tw-py-1 tw-rounded hover:tw-bg-blue-50 tw-transition-colors\">Upgrade</button>\n </div>\n <div class=\"storage-bar tw-bg-gray-200 tw-rounded-full tw-h-1.5\">\n <div class=\"storage-fill tw-bg-blue-500 tw-h-1.5 tw-rounded-full tw-transition-all\"\n style=\"width: 75%\"></div>\n </div>\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mt-1.5\">\n <div class=\"tw-text-xs tw-text-gray-500\">18.2 GB of 20 GB used</div>\n <div class=\"tw-text-xs tw-text-blue-500\">75%</div>\n </div>\n\n <!-- Plan features quick view -->\n <div\n class=\"plan-features tw-flex tw-items-center tw-justify-between tw-mt-3 tw-pt-3 tw-border-t tw-border-gray-100\">\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-gray-700\">Free Plan</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Basic features</span>\n </div>\n <div class=\"tw-flex tw-gap-2\">\n <button\n class=\"tw-text-xs tw-bg-white tw-border tw-border-gray-200 tw-text-gray-700 tw-py-1 tw-px-2 tw-rounded hover:tw-bg-gray-50 tw-transition-colors\">Compare\n Plans</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-sidebar-page-inner-wrapper\"\n [minPrevSize]=\"sidebarSetupData.cide_lyt_sidebar_width\" prevElementSelector=\"#cide-lyt-sidebar-page\"\n nextElementSelector=\"#cide-lyt-page-wrapper\" cideEleResizer direction=\"horizontal\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n</nav>", styles: [".cide-lyt-sidebar{display:flex;box-shadow:0 4px 12px #0000000d;overflow:hidden;background-color:var(--cide-theme-sidebar-color);--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);--sidebar-shadow-color: rgba(0, 0, 0, .05);transition:width .3s cubic-bezier(.4,0,.2,1);max-height:100%;isolation:isolate;will-change:width;position:relative}.cide-lyt-sidebar.collapsed{animation:collapseEffect .3s forwards}.cide-lyt-sidebar:not(.collapsed){animation:expandEffect .3s forwards}@keyframes collapseEffect{0%{box-shadow:0 4px 12px var(--sidebar-shadow-color)}to{box-shadow:0 2px 8px var(--sidebar-shadow-color)}}@keyframes expandEffect{0%{box-shadow:0 2px 8px var(--sidebar-shadow-color)}to{box-shadow:0 4px 12px var(--sidebar-shadow-color)}}.cide-lyt-sidebar.animating{transition:width .3s cubic-bezier(.25,.46,.45,.94)}.cide-lyt-sidebar.collapsed .cide-lyt-sidebar-menu{width:0;opacity:0;visibility:hidden;transform:translate(-10px)}.cide-lyt-stack{background:linear-gradient(to bottom,var(--cide-theme-sidebar-color),var(--cide-theme-light-color));z-index:10;border-right:1px solid var(--cide-theme-light-color);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:0 0 1.5rem;transition:all .3s cubic-bezier(.4,0,.2,1);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--cide-theme-color-brand-primary) transparent;position:relative;will-change:transform;scroll-behavior:smooth;box-shadow:inset -1px 0 0 var(--sidebar-shadow-color)}.cide-lyt-stack:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(to top,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.cide-lyt-stack:before{content:\"\";position:absolute;top:0;left:0;right:0;height:30px;background:linear-gradient(to bottom,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.cide-lyt-stack.scrolled-down:before{opacity:1}.cide-lyt-stack.scrolled-up:after{opacity:1}.cide-lyt-stack{position:relative;z-index:1;-webkit-overflow-scrolling:touch;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--cide-theme-color-brand-primary) transparent}.cide-lyt-stack::-webkit-scrollbar{width:2px}.cide-lyt-stack::-webkit-scrollbar-track{background:transparent;margin:10px 0}.cide-lyt-stack::-webkit-scrollbar-thumb{background:var(--cide-theme-color-brand-primary);border-radius:4px;box-shadow:0 0 6px var(--cide-theme-color-brand-primary)}.cide-lyt-stack:hover::-webkit-scrollbar-thumb{background:var(--cide-theme-color-brand-primary);box-shadow:0 0 10px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.4)}.cide-lyt-stack:hover::-webkit-scrollbar{width:3px}.cide-lyt-stack:before,.cide-lyt-stack:after,.sidebar-content:before,.sidebar-content:after,.notification-panel:before,.notification-panel:after,.user-menu:before,.user-menu:after,.options-menu:before,.options-menu:after{content:\"\";position:absolute;left:0;right:0;height:24px;z-index:5;pointer-events:none;opacity:0;transition:opacity .3s ease}.cide-lyt-stack:before,.sidebar-content:before,.notification-panel:before,.user-menu:before,.options-menu:before{top:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),#fff0)}.cide-lyt-stack:after,.sidebar-content:after,.notification-panel:after,.user-menu:after,.options-menu:after{bottom:0;background:linear-gradient(to top,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),#fff0)}.cide-lyt-stack.is-scrollable-top:before,.sidebar-content.is-scrollable-top:before,.notification-panel.is-scrollable-top:before,.user-menu.is-scrollable-top:before,.options-menu.is-scrollable-top:before{opacity:1}.cide-lyt-stack.is-scrollable-bottom:after,.sidebar-content.is-scrollable-bottom:after,.notification-panel.is-scrollable-bottom:after,.user-menu.is-scrollable-bottom:after,.options-menu.is-scrollable-bottom:after{opacity:1}.collapse-toggle{margin-bottom:.5rem;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:5;border-radius:50%;overflow:hidden}.collapse-toggle:before{content:\"\";position:absolute;inset:0;background:var(--cide-theme-label-color);opacity:0;transition:opacity .2s ease;z-index:-1}.collapse-toggle:hover{transform:scale(1.1)}.collapse-toggle:hover:before{opacity:1}.collapse-toggle:active{transform:scale(.95);transition:transform .1s ease}.collapse-toggle:focus-visible{outline:2px solid var(--cide-theme-color-brand-primary);outline-offset:2px}.sidebar-scroll-content{width:100%;padding-top:.75rem;position:relative;z-index:1;overflow-y:auto;overflow-x:hidden;flex-grow:1;display:flex;flex-direction:column;align-items:center;padding:1rem 0;gap:.5rem;max-height:calc(100% - 8rem)}.nav-item{position:relative;width:30px;height:30px;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;margin:4px 0;border-radius:10px;box-shadow:0 0 #3b82f600;transform-origin:center;overflow:hidden;color:var(--cide-theme-text-color)}.nav-item:before{content:\"\";position:absolute;inset:0;background:radial-gradient(circle at center,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.01));opacity:0;transition:opacity .3s ease;z-index:-1}.nav-item:hover{background-color:color-mix(in srgb,var(--cide-theme-light-color) 90%,transparent);transform:translateY(-1px);box-shadow:0 2px 6px var(--cide-theme-shadow-color)}.nav-item:hover:before{opacity:1}.nav-item:active{transition:all .1s ease;transform:translateY(-1px);box-shadow:0 2px 6px var(--cide-theme-shadow-color)}.nav-item:active{transform:translateY(1px);transition:all .1s ease}.nav-item-active{background:linear-gradient(135deg,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.12));box-shadow:0 2px 8px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.15);transform:translateZ(0);color:var(--cide-theme-color-brand-primary)}.nav-item-active:after{content:\"\";position:absolute;bottom:-2px;left:30%;right:30%;height:2px;background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0),var(--cide-theme-color-brand-primary),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));border-radius:1px;animation:pulseGlow 2s infinite}@keyframes pulseGlow{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}.nav-item-active:hover{background:linear-gradient(135deg,#3b82f61a,#3b82f626)}.nav-badge{z-index:5;transition:all .3s ease}.nav-item:hover .nav-badge{transform:scale(1.1)}.nav-tooltip{position:fixed;left:64px;top:50%;transform:translateY(-50%) translate(-5px);background-color:var(--sidebar-tooltip-bg);color:var(--sidebar-tooltip-color);padding:.4rem .75rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:0 2px 8px var(--cide-theme-shadow-color);letter-spacing:.01em;will-change:transform,opacity;max-width:220px;text-overflow:ellipsis;overflow:hidden;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.nav-tooltip:before{content:\"\";position:absolute;top:50%;right:100%;transform:translateY(-50%);border-width:6px;border-style:solid;border-color:transparent var(--sidebar-tooltip-bg) transparent transparent;filter:drop-shadow(-2px 0px 1px rgba(0,0,0,.1))}.nav-item:hover .nav-tooltip{opacity:1;transform:translateY(-50%) translate(0);box-shadow:0 3px 12px var(--cide-theme-shadow-color)}.nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 10%,var(--cide-theme-light-color));border-radius:.5rem}.nav-item-active:before{opacity:0}.active-nav-icon{color:var(--cide-lyt-sidebar-nav-item-color-active)!important;filter:drop-shadow(0 0 3px rgba(59,130,246,.3))}.nav-indicator{position:absolute;left:-8px;top:50%;transform:translateY(-50%);width:3px;height:60%;background:var(--cide-theme-color-brand-primary);border-radius:0 4px 4px 0;opacity:0;transition:all .3s ease;box-shadow:0 0 6px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.5)}.nav-item-active .nav-indicator{opacity:1;left:0}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.sidebar-scroll-content .nav-item{opacity:0;animation:fadeSlideIn .5s forwards}.sidebar-scroll-content .nav-item:nth-child(1){animation-delay:.05s}.sidebar-scroll-content .nav-item:nth-child(2){animation-delay:.1s}.sidebar-scroll-content .nav-item:nth-child(3){animation-delay:.15s}.sidebar-scroll-content .nav-item:nth-child(4){animation-delay:.2s}.sidebar-scroll-content .nav-item:nth-child(5){animation-delay:.25s}.sidebar-scroll-content .nav-item:nth-child(6){animation-delay:.3s}.sidebar-scroll-content .nav-item:nth-child(7){animation-delay:.35s}.sidebar-scroll-content .nav-item:nth-child(8){animation-delay:.4s}.sidebar-scroll-content .nav-item:nth-child(9){animation-delay:.45s}.sidebar-scroll-content .nav-item:nth-child(10){animation-delay:.5s}.sidebar-scroll-content .nav-item:nth-child(11){animation-delay:.55s}.sidebar-scroll-content .nav-item:nth-child(12){animation-delay:.6s}.sidebar-scroll-content .nav-item:nth-child(13){animation-delay:.65s}.sidebar-scroll-content .nav-item:nth-child(14){animation-delay:.7s}.sidebar-scroll-content .nav-item:nth-child(15){animation-delay:.75s}cide-ele-icon[type=box]{cursor:pointer;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}cide-ele-icon[type=box]:hover{background-color:#f3f4f6;transform:translateY(-1px)}cide-ele-icon[type=box]:active{transform:translateY(0)}.theme-toggle{position:relative;overflow:hidden;padding:.5rem;border-radius:12px;background-color:transparent;border:2px solid transparent;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem}.theme-toggle:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:radial-gradient(circle at center,rgba(59,130,246,.2) 0%,transparent 70%);opacity:0;transition:opacity .3s ease;border-radius:.5rem}.theme-toggle:hover{background-color:var(--cide-theme-hover-bg-color, rgba(243, 244, 246, 1));border-color:var(--cide-theme-color-brand-primary, rgba(59, 130, 246, .3));transform:translateY(-1px);box-shadow:0 4px 12px #0000001a}.theme-toggle:hover:after{opacity:1}.theme-toggle:focus{outline:none;box-shadow:0 0 0 3px #3b82f64d}.theme-toggle cide-ele-icon{color:var(--cide-theme-icon-color, #6b7280);transition:all .2s ease;width:1.25rem;height:1.25rem;display:flex;align-items:center;justify-content:center}.theme-toggle:hover cide-ele-icon{color:var(--cide-theme-color-brand-primary, #3b82f6);transform:scale(1.1) rotate(10deg)}.dark-mode .theme-toggle:after{background:radial-gradient(circle at center,rgba(96,165,250,.2) 0%,transparent 70%)}.dark-mode .theme-toggle:hover{background-color:var(--cide-theme-dark-hover-bg-color, rgba(55, 65, 81, 1));border-color:var(--cide-theme-color-brand-primary, rgba(96, 165, 250, .3))}.notification-badge{font-size:.65rem;min-width:20px;height:20px;box-shadow:0 2px 4px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.25);transform-origin:center;position:relative;animation:pulseNotification 2s infinite;overflow:hidden;background-color:var(--cide-theme-color-brand-primary);color:var(--cide-theme-light-color)}.notification-badge:before{content:\"\";position:absolute;inset:0;background:linear-gradient(135deg,#ffffff4d,#fff0);opacity:0;transition:opacity .3s ease}.notification-badge:hover:before{opacity:1}@keyframes pulseNotification{0%{box-shadow:0 0 rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.4);transform:scale(1)}40%{transform:translateY(-5px)}50%{box-shadow:0 0 0 4px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0);transform:scale(1.05)}60%{transform:translateY(-2px)}to{box-shadow:0 0 rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0);transform:scale(1)}}.user-avatar{transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;box-shadow:0 2px 5px #00000014;z-index:2}.user-avatar:hover{transform:scale(1.08);box-shadow:0 4px 12px #00000026}.user-avatar:before{content:\"\";position:absolute;inset:-3px;background:radial-gradient(circle,rgba(59,130,246,.3),transparent 70%);opacity:0;transition:opacity .3s ease;z-index:-1;border-radius:50%}.user-avatar:hover:before{opacity:1}.user-status{position:absolute;bottom:0;right:0;width:10px;height:10px;border-radius:50%;border:2px solid white;transition:all .3s ease}.user-status.online{background-color:#10b981;animation:statusPulse 2s infinite}.user-status.busy{background-color:#f59e0b}.user-status.offline{background-color:#6b7280}.user-status.dnd{background-color:#ef4444}@keyframes statusPulse{0%{box-shadow:0 0 #10b98166}70%{box-shadow:0 0 0 6px #10b98100}to{box-shadow:0 0 #10b98100}}.dark-mode .user-avatar{box-shadow:0 2px 5px #0003}.dark-mode .user-avatar:before{background:radial-gradient(circle,rgba(96,165,250,.4),transparent 70%)}.dark-mode .user-status{border-color:#0f172a}.user-dropdown{position:relative}.user-menu{animation:fadeInUp .2s cubic-bezier(.4,0,.2,1);z-index:30;margin-left:10px;margin-bottom:5px;max-height:80vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;box-shadow:0 10px 25px #0000001a;border-radius:.75rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);position:absolute;left:100%;bottom:0;margin-top:.5rem;margin-left:.5rem;width:14rem;border-radius:.375rem;box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color);background-color:var(--cide-theme-sidebar-color);border:1px solid var(--cide-theme-border-color);z-index:50;overflow:hidden}.user-menu a{color:var(--cide-theme-text-color);transition:background-color .2s ease}.user-menu a:hover{background-color:var(--cide-theme-hover-bg-color)}.user-menu .tw-text-red-700{color:var(--cide-theme-error-color)}.user-menu::-webkit-scrollbar{width:3px}.user-menu::-webkit-scrollbar-track{background:transparent}.user-menu::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.user-status{transition:all .3s ease;box-shadow:0 0 0 2px var(--cide-theme-sidebar-color)}.user-status.online{animation:pulseOnline 2s infinite}@keyframes pulseOnline{0%{box-shadow:0 0 #22c55e66,0 0 0 2px var(--cide-theme-sidebar-color)}70%{box-shadow:0 0 0 4px #22c55e00,0 0 0 2px var(--cide-theme-sidebar-color)}to{box-shadow:0 0 #22c55e00,0 0 0 2px var(--cide-theme-sidebar-color)}}.cide-lyt-sidebar-menu{width:auto;background-color:var(--cide-theme-sidebar-color);border-left:1px solid rgba(243,244,246,1);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;overflow:hidden;max-height:100%;position:relative;will-change:width,opacity,transform}.sidebar-header{background-color:var(--cide-theme-sidebar-color);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);position:sticky;top:0;z-index:10;border-bottom:1px solid rgba(243,244,246,.8);padding:1rem .75rem;transition:all .3s ease}.sidebar-header.scrolled{box-shadow:0 4px 10px -8px #0000001a}.back-button{transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%}.back-button:hover{transform:translate(-2px);background-color:#f3f4f6}.back-button:active{transform:translate(-1px) scale(.95)}.search-wrapper{position:relative;transition:all .3s ease}.search-wrapper:focus-within{transform:translateY(-1px)}.search-shortcut{font-size:.65rem;opacity:.7;letter-spacing:.02em;pointer-events:none;padding:.1rem .3rem;background-color:#f3f4f6cc;border-radius:.25rem;border:1px solid rgba(229,231,235,.8);transition:all .3s ease}.search-wrapper:focus-within .search-shortcut{opacity:.5}.options-menu{animation:fadeInUp .2s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000001a;max-height:70vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;border-radius:.75rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.options-menu::-webkit-scrollbar{width:3px}.options-menu::-webkit-scrollbar-track{background:transparent}.options-menu::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.sidebar-section{position:relative;padding:.5rem 0}.sidebar-section:not(:first-child):before{content:\"\";height:1px;background:linear-gradient(to right,#e5e7eb00,#e5e7eb80,#e5e7eb00);position:absolute;top:0;left:10%;right:10%}.tw-text-xs.tw-font-semibold.tw-text-gray-500{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;position:relative;display:inline-block;padding:0 .5rem;color:var(--cide-theme-label-color)}.tw-text-xs.tw-font-semibold.tw-text-gray-500:after{content:\"\";position:absolute;height:3px;width:2rem;background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.5),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));bottom:-4px;left:.5rem;border-radius:3px;transition:width .3s ease}.sidebar-section:hover .tw-text-xs.tw-font-semibold.tw-text-gray-500:after{width:3rem}.menu-item{text-decoration:none;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;margin:3px 0;border-radius:.5rem;transform:translateZ(0);color:var(--cide-theme-text-color)}.menu-item:hover{transform:translate(3px);background-color:var(--cide-theme-light-color);box-shadow:0 1px 3px var(--sidebar-shadow-color)}.active-menu-item{background-color:rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08);position:relative;box-shadow:0 2px 5px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1)}.active-menu-item:after{content:\"\";position:absolute;left:0;top:0;height:100%;width:3px;background:linear-gradient(to bottom,var(--cide-theme-color-brand-primary),var(--cide-theme-secondary-color));border-radius:0 2px 2px 0;box-shadow:0 0 6px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.3);animation:pulseLeftBorder 2s infinite}@keyframes pulseLeftBorder{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.dark-mode .active-menu-item{background-color:#1e293b80;box-shadow:0 2px 5px #0f172a33}.dark-mode .active-menu-item:after{background:linear-gradient(to bottom,#60a5fa,#3b82f6);box-shadow:0 0 8px #60a5fa66}.quick-actions{transition:all .3s ease;opacity:0;transform:translate(5px);z-index:2}.menu-item:hover .quick-actions{opacity:1;transform:translate(0)}.badge{font-size:.7rem;padding:1px 5px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;z-index:1}.menu-item:hover .badge{background-color:#d1d5db}.new-badge{animation:pulse 2s infinite;z-index:1}@keyframes pulse{0%{box-shadow:0 0 #3b82f666}70%{box-shadow:0 0 0 4px #3b82f600}to{box-shadow:0 0 #3b82f600}}.toggle-switch{display:inline-flex;align-items:center;transition:all .2s ease}.toggle-switch:hover{transform:scale(1.05)}.toggle-track{position:relative;cursor:pointer;transition:background-color .3s ease;overflow:hidden}.toggle-track:after{content:\"\";position:absolute;top:50%;left:50%;width:5px;height:5px;background:#ffffffb3;opacity:0;border-radius:100%;transform:scale(1) translate(-50%,-50%);transform-origin:50% 50%}.toggle-track.clicked:after{animation:ripple .6s ease-out}@keyframes ripple{0%{opacity:1;transform:scale(0) translate(-50%,-50%)}to{opacity:0;transform:scale(20) translate(-50%,-50%)}}.alert-box{animation:fadeIn .5s cubic-bezier(.4,0,.2,1);box-shadow:0 2px 8px #fde04726;border-radius:.5rem;position:relative;overflow:hidden}.alert-box:before{content:\"\";position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fef3c7' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E\");opacity:.3;pointer-events:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.notification-panel{animation:fadeIn .3s cubic-bezier(.4,0,.2,1);overflow-y:auto;max-height:100vh;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;padding:.75rem;border-radius:.75rem}.notification-panel::-webkit-scrollbar{width:3px}.notification-panel::-webkit-scrollbar-track{background:transparent}.notification-panel::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.notification-panel:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.notification-item{transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;border-radius:.5rem;margin-bottom:.5rem;position:relative;overflow:hidden}.notification-item:hover{background-color:#f3f4f6;transform:translate(1px)}.notification-item:active{transform:scale(.99)}.notification-item.unread:before{content:\"\";position:absolute;left:0;top:0;height:100%;width:3px;background-color:var(--cide-theme-color-brand-primary);border-radius:0 2px 2px 0}.sidebar-footer{background-color:var(--cide-theme-light-color);position:sticky;bottom:0;z-index:10;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid rgba(243,244,246,.8);padding:.75rem;transition:all .3s ease}.upgrade-button{transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;border-radius:.5rem;color:var(--cide-theme-text-color)}.upgrade-button:hover{background-color:rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1);transform:translateY(-1px)}.upgrade-button:active{transform:translateY(0) scale(.98)}.upgrade-button:after{content:\"\";position:absolute;width:12px;height:12px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E\");top:5px;right:10px;opacity:.5;transform:scale(0);transition:all .3s ease}.upgrade-button:hover:after{transform:scale(1) rotate(20deg);animation:float 3s ease-in-out infinite}@keyframes float{0%,to{transform:scale(1) rotate(5deg) translate(0)}50%{transform:scale(1.1) rotate(-5deg) translate(-2px,-2px)}}.storage-bar{background-color:#e5e7eb80;overflow:hidden;border-radius:4px;height:6px;position:relative}.storage-fill{background:linear-gradient(to right,var(--cide-theme-color-brand-primary),var(--cide-theme-secondary-color));transition:width 1s cubic-bezier(.4,0,.2,1);position:relative;height:100%;border-radius:4px}.storage-fill:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,#fff0,#fff3,#fff0);animation:shimmer 2s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}.plan-features{transition:all .3s ease;padding:.5rem;border-radius:.5rem}.plan-features:hover{background-color:#f3f4f680}.feature-item{display:flex;align-items:center;margin:.25rem 0;position:relative;padding-left:1.25rem;color:var(--cide-theme-text-color)}.feature-item:before{content:\"\\2713\";position:absolute;left:0;color:var(--cide-theme-color-brand-primary);font-size:.7rem;top:50%;transform:translateY(-50%)}.sidebar-content{scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding:0 .75rem;transition:all .3s ease;position:relative;scroll-behavior:smooth;scroll-padding:1rem;overscroll-behavior:contain}.sidebar-content:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(to top,rgba(255,255,255,.9),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.sidebar-content:before{content:\"\";position:absolute;top:0;left:0;right:0;height:30px;background:linear-gradient(to bottom,rgba(255,255,255,.9),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.sidebar-content.scrolled-down:before{opacity:1}.sidebar-content.scrolled-up:after{opacity:1}.sidebar-content::-webkit-scrollbar{width:3px}.sidebar-content::-webkit-scrollbar-track{background:transparent}.sidebar-content::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.sidebar-content:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.cide-lyt-sidebar *::-webkit-scrollbar{width:3px}.cide-lyt-sidebar *::-webkit-scrollbar-track{background:transparent}.cide-lyt-sidebar *::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.cide-lyt-sidebar *:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.sidebar-section{transition:all .3s ease-out;transform:translateY(0);opacity:1}.sidebar-section.animate-in{animation:slideInUp .4s cubic-bezier(.4,0,.2,1) forwards}@keyframes slideInUp{0%{opacity:.5;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}.sidebar-section:nth-child(1).animate-in{animation-delay:.1s}.sidebar-section:nth-child(2).animate-in{animation-delay:.2s}.sidebar-section:nth-child(3).animate-in{animation-delay:.3s}.sidebar-section:nth-child(4).animate-in{animation-delay:.4s}.sidebar-section:nth-child(5).animate-in{animation-delay:.5s}:host ::ng-deep cide-ele-input{width:100%}:host ::ng-deep .cide-input-field{border-radius:8px;background-color:#f9fafb;border:1px solid transparent;transition:all .2s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .cide-input-field:focus-within{border-color:#d1d5db;background-color:#fff;box-shadow:0 2px 8px #0000000d;transform:translateY(-1px)}.cide-lyt-sidebar *:focus{outline:none;box-shadow:0 0 0 2px #3b82f64d}.dark-mode{--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);background-color:#1e293b;color:var(--cide-theme-light-color)}.dark-mode .cide-lyt-stack{background-color:#0f172a;border-right-color:#1e293b}.dark-mode .cide-lyt-stack:before,.dark-mode .cide-lyt-stack:after,.dark-mode .sidebar-content:before,.dark-mode .sidebar-content:after{background:linear-gradient(to bottom,rgba(15,23,42,.9),transparent)}.dark-mode .sidebar-content:after,.dark-mode .cide-lyt-stack:after{background:linear-gradient(to top,rgba(15,23,42,.9),transparent)}.dark-mode .cide-lyt-sidebar-menu{background-color:#0f172a;border-left-color:#1e293b}.dark-mode .sidebar-header,.dark-mode .sidebar-footer{background-color:#0f172af2;border-color:#1e293b}.dark-mode .tw-text-gray-700{color:#e2e8f0}.dark-mode .tw-text-gray-500{color:#94a3b8}.dark-mode .tw-bg-gray-50,.dark-mode .menu-item:hover{background-color:#1e293b80}.dark-mode .tw-bg-gray-100{background-color:#1e293b}.dark-mode .tw-bg-gray-200{background-color:#334155}.dark-mode .nav-item:hover:before{background-color:#60a5fa1a}.dark-mode .back-button:hover{background-color:#1e293bb3}.dark-mode .sidebar-section:not(:first-child):before{background:linear-gradient(to right,#33415500,#33415580,#33415500)}.dark-mode .toggle-track:after{background:#00000080}.dark-mode .alert-box:before{opacity:.2}.dark-mode :host ::ng-deep .cide-input-field{background-color:#1e293b;color:#e2e8f0}.dark-mode :host ::ng-deep .cide-input-field:focus-within{border-color:#475569;background-color:#0f172a}.dark-mode *::-webkit-scrollbar-thumb{background-color:#47556980}.dark-mode *:hover::-webkit-scrollbar-thumb{background-color:#64748b99}.nav-item-active .nav-indicator{animation:pulseIndicator 2s infinite}@keyframes pulseIndicator{0%{box-shadow:0 0 #3b82f666}70%{box-shadow:0 0 0 3px #3b82f600}to{box-shadow:0 0 #3b82f600}}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}@media screen and (max-width: 1024px){.cide-lyt-sidebar-menu{width:220px}.sidebar-content{padding:0 .5rem}.tw-text-xs.tw-font-semibold.tw-text-gray-500{font-size:.65rem}}@media screen and (max-width: 768px){.cide-lyt-sidebar-menu{position:fixed;width:100%;max-width:280px;left:72px;z-index:40;box-shadow:0 10px 25px #00000026;border-radius:0 1rem 1rem 0}.cide-lyt-sidebar.collapsed .cide-lyt-sidebar-menu{left:-100%}.sidebar-overlay{position:fixed;inset:0;background-color:#0000004d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .3s ease;z-index:35}.sidebar-overlay.active{opacity:1;pointer-events:auto}}.cide-lyt-sidebar,.cide-lyt-stack,.cide-lyt-sidebar-menu,.sidebar-logo,.nav-item,.menu-item,.user-avatar,.upgrade-button,.storage-fill,.notification-item,.sidebar-section.animate-in{transform:translateZ(0);backface-visibility:hidden;perspective:1000px;will-change:transform,opacity}.dark-mode .nav-item-active{background:linear-gradient(135deg,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.15),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1));box-shadow:0 2px 8px #1e40af40}.dark-mode .nav-item-active:after{background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0),rgba(var(--cide-theme-secondary-color-rgb, 74, 222, 128),.6),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));box-shadow:0 0 5px rgba(var(--cide-theme-secondary-color-rgb, 74, 222, 128),.5)}.dark-mode .nav-item:hover{background-color:#33415580;box-shadow:0 2px 8px #0f172a4d}.dark-mode .nav-tooltip{background-color:#0f172ae6;box-shadow:0 3px 10px #0006;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.dark-mode .nav-tooltip:before{border-color:transparent rgba(15,23,42,.9) transparent transparent}.text-theme-primary{color:var(--cide-theme-color-brand-primary)}.text-theme-secondary{color:var(--cide-theme-secondary-color)}.text-theme-text{color:var(--cide-theme-text-color)}.text-theme-label{color:var(--cide-theme-label-color)}.bg-theme-primary{background-color:var(--cide-theme-color-brand-primary)}.bg-theme-secondary{background-color:var(--cide-theme-secondary-color)}.bg-theme-light{background-color:var(--cide-theme-light-color)}.bg-theme-dark{background-color:var(--cide-theme-dark-color)}.bg-theme-sidebar{background-color:var(--cide-theme-sidebar-color)}.border-theme-light{border-color:var(--cide-theme-light-color)}.border-theme-primary{border-color:var(--cide-theme-color-brand-primary)}.hover-bg-theme-light:hover{background-color:var(--cide-theme-light-color)}.hover-text-theme-primary:hover{color:var(--cide-theme-color-brand-primary)}.tw-text-gray-500{color:var(--cide-theme-icon-color)}.hover\\:tw-text-gray-700:hover{color:var(--cide-theme-icon-hover-color)}.tw-text-gray-700{color:var(--cide-theme-text-color)}.tw-text-red-500,.tw-text-red-600,.tw-text-red-700{color:var(--cide-theme-error-color)}.tw-bg-gray-200{background-color:var(--cide-theme-border-color)}.hover\\:tw-bg-gray-100:hover{background-color:var(--cide-theme-hover-bg-color)}.tw-bg-white{background-color:var(--cide-theme-sidebar-color)}.tw-bg-green-500{background-color:var(--cide-theme-success-color)}.tw-border-gray-100,.tw-divide-gray-100{border-color:var(--cide-theme-border-color)}.tw-shadow-lg{box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color)}.tw-shadow-sm,.hover\\:tw-shadow:hover{box-shadow:0 1px 2px 0 var(--cide-theme-shadow-color)}.active-nav-icon{color:var(--cide-theme-color-brand-primary)!important}.nav-item{display:flex;align-items:center;justify-content:center;position:relative;border-radius:.375rem}.nav-item:hover{background-color:var(--cide-theme-hover-bg-color)}.nav-item:hover cide-ele-icon{color:var(--cide-theme-icon-hover-color)}.nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 10%,var(--cide-theme-light-color))}.nav-item-active cide-ele-icon{color:var(--cide-theme-color-brand-primary)}.nav-indicator{opacity:0;transition:opacity .2s ease}.nav-item-active .nav-indicator{opacity:1}.nav-tooltip{position:absolute;left:100%;top:50%;transform:translateY(-50%);background-color:var(--sidebar-tooltip-bg);color:var(--sidebar-tooltip-color);padding:.25rem .5rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s ease;margin-left:.5rem;z-index:30;box-shadow:0 2px 8px var(--cide-theme-shadow-color)}.nav-item:hover .nav-tooltip{opacity:1}.nav-badge{position:absolute;top:-.25rem;right:-.25rem;width:.375rem;height:.375rem;border-radius:9999px;background-color:var(--cide-theme-error-color);animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.user-avatar{width:2.5rem;height:2.5rem;border-radius:9999px;overflow:hidden;background-color:var(--cide-theme-border-color);border:2px solid var(--cide-theme-sidebar-color);box-shadow:0 1px 2px var(--cide-theme-shadow-color);cursor:pointer;transition:box-shadow .2s ease}.user-avatar:hover{box-shadow:0 2px 4px var(--cide-theme-shadow-color)}.user-status{position:absolute;bottom:0;right:0;width:.75rem;height:.75rem;border-radius:9999px;background-color:var(--cide-theme-success-color);border:2px solid var(--cide-theme-sidebar-color)}.dark-mode .nav-item:hover{background-color:#ffffff1a}.dark-mode .nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 30%,var(--cide-theme-dark-color))}.dark-mode .user-avatar{border-color:var(--cide-theme-dark-color);background-color:#ffffff1a}.dark-mode .user-status{border-color:var(--cide-theme-dark-color)}.dark-mode .user-menu{background-color:var(--cide-theme-dark-color);border-color:#ffffff1a}.dark-mode .user-menu a{color:#fffc}.dark-mode .user-menu a:hover{background-color:#ffffff1a}.section-header{transition:all .2s ease;border:1px solid transparent}.section-header:hover{background-color:#f8fafc!important;border-color:#e2e8f0}.section-header:focus{outline:none;box-shadow:0 0 0 2px #3b82f6;border-color:#3b82f6}.section-content{overflow:hidden;transition:all .3s ease}.section-header .tw-rotate-90{transform:rotate(90deg)}.section-content .tw-border-l{border-left-color:#d1d5db}.section-header:hover .tw-text-gray-500{color:#6b7280}.section-header:hover .tw-text-gray-800{color:#374151}\n"], dependencies: [{ kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CideEleResizerDirective, selector: "[cideEleResizer]", inputs: ["direction", "to", "prevElementSelector", "nextElementSelector", "parentElementSelector", "minPrevSize", "minNextSize", "usePercentage"], outputs: ["resizeStart", "resizing", "resizeEnd"] }, { kind: "directive", type: TooltipDirective, selector: "[cideEleTooltip]", inputs: ["cideEleTooltip", "tooltipColor", "tooltipBg", "tooltipPlacement", "tooltipType", "tooltipDelay", "tooltipDir", "tooltipShowArrow", "tooltipMultiline", "tooltipMaxWidth", "tooltipInteractive", "tooltipClass"] }, { kind: "component", type: CideSpinnerComponent, selector: "cide-ele-spinner", inputs: ["size", "type"] }], animations: [
1877
+ trigger('slideInOut', [
1878
+ state('in', style({
1879
+ opacity: 1,
1880
+ transform: 'translateY(0)',
1881
+ height: '*'
1882
+ })),
1883
+ state('out', style({
1884
+ opacity: 0,
1885
+ transform: 'translateY(-10px)',
1886
+ height: '0px'
1887
+ })),
1888
+ transition('in => out', animate('200ms ease-in')),
1889
+ transition('out => in', animate('200ms ease-out'))
1890
+ ])
1891
+ ] }); }
1892
+ }
1893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidebarWrapperComponent, decorators: [{
1894
+ type: Component,
1895
+ args: [{ selector: 'cide-lyt-sidebar-wrapper', standalone: true, imports: [CideIconComponent, CideInputComponent, CommonModule, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent], animations: [
1896
+ trigger('slideInOut', [
1897
+ state('in', style({
1898
+ opacity: 1,
1899
+ transform: 'translateY(0)',
1900
+ height: '*'
1901
+ })),
1902
+ state('out', style({
1903
+ opacity: 0,
1904
+ transform: 'translateY(-10px)',
1905
+ height: '0px'
1906
+ })),
1907
+ transition('in => out', animate('200ms ease-in')),
1908
+ transition('out => in', animate('200ms ease-out'))
1909
+ ])
1910
+ ], template: "<nav class=\"cide-lyt-sidebar tw-flex tw-h-full tw-select-none\" [class.collapsed]=\"isCollapsed\">\n <!-- First tier sidebar (Icon only) -->\n <div class=\"cide-lyt-stack tw-h-full tw-flex tw-flex-col tw-items-center tw-border-r tw-border-gray-100\">\n <!-- Scrollable content -->\n <div class=\"sidebar-scroll-content\">\n <!-- Collapse/Expand toggle -->\n <div class=\"nav-item collapse-toggle\" tabindex=\"0\" (click)=\"toggleSidebar()\"\n (keydown.enter)=\"toggleSidebar()\">\n <div class=\"nav-tooltip\">{{isCollapsed ? 'Expand' : 'Collapse'}} Sidebar</div>\n <cide-ele-icon size=\"xs\" type=\"box\" class=\"tw-text-gray-500 hover:tw-text-gray-700\">\n {{isCollapsed ? 'chevron_right' : 'chevron_left'}}\n </cide-ele-icon>\n </div> <!-- Main navigation icons - Enhanced Design -->\n <div class=\"tw-flex tw-flex-col tw-gap-4\">\n @for (core_system_module_item of core_system_module; track $index) {\n <div class=\"nav-item tw-relative tw-group\" (click)=\"setActiveMenu(core_system_module_item._id)\"\n [cideEleTooltip]=\"core_system_module_item.syme_title\" [tooltipShowArrow]=\"true\"\n tooltipPlacement=\"right\"\n [ngClass]=\"{'nav-item-active': activeModuleId === core_system_module_item._id}\"\n (mouseenter)=\"onItemHover(core_system_module_item._id)\" (mouseleave)=\"onItemHover('')\"\n [tabindex]=\"$index\" (keydown.enter)=\"setActiveMenu(core_system_module_item._id)\">\n\n <!-- Notification Badge with enhanced design -->\n @if (core_system_module_item?.syme_ping) {\n <div class=\"nav-badge tw-absolute -tw-top-1 -tw-right-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-animate-ping\"\n style=\"background-color: var(--cide-theme-error-color);\">\n </div>\n }\n\n <!-- Enhanced icon with better visual effects -->\n <div\n class=\"tw-p-2 tw-rounded-xl tw-transition-all tw-duration-200 tw-ease-in-out\n group-hover:tw-bg-blue-50 group-hover:tw-shadow-md group-hover:tw-scale-105\n tw-border-2 tw-border-transparent\n {{activeModuleId === core_system_module_item._id ? 'tw-bg-blue-100 tw-border-blue-200 tw-shadow-sm' : 'tw-bg-gray-50'}}\">\n <cide-ele-icon type=\"box\" size=\"xs\"\n class=\"tw-transition-all tw-duration-200 tw-ease-in-out\n {{activeModuleId === core_system_module_item._id ? 'tw-text-blue-600' : 'tw-text-gray-600 group-hover:tw-text-blue-500'}}\">\n {{core_system_module_item?.syme_icon || 'dashboard'}}\n </cide-ele-icon>\n </div>\n\n <!-- Modern active indicator -->\n @if (activeModuleId === core_system_module_item._id) {\n <div\n class=\"nav-indicator tw-absolute tw-left-0 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-w-1 tw-h-8 tw-bg-blue-500 tw-rounded-r-full tw-shadow-lg tw-transition-all tw-duration-300\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Bottom section with enhanced theme toggle and user avatar -->\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-3 tw-mt-auto tw-pb-4\">\n <!-- Theme toggle with modern design -->\n <div class=\"nav-item tw-group\">\n <div class=\"nav-tooltip\">Toggle Theme</div>\n <button class=\"theme-toggle\" (click)=\"toggleTheme()\" (keydown.enter)=\"toggleTheme()\"\n (keydown.space)=\"toggleTheme()\" tabindex=\"0\" role=\"button\" aria-label=\"Toggle theme\">\n <cide-ele-icon type=\"box\" size=\"sm\">\n {{darkMode ? 'light_mode' : 'dark_mode'}}\n </cide-ele-icon>\n </button>\n </div>\n\n <!-- User avatar with dropdown -->\n <div class=\"tw-relative user-dropdown\" \n (click)=\"toggleUserMenu()\"\n (keydown.enter)=\"toggleUserMenu()\"\n (keydown.space)=\"toggleUserMenu()\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Toggle user menu\"\n [attr.aria-expanded]=\"showUserMenu\">\n <div class=\"nav-tooltip\">Your Profile</div>\n <div class=\"user-avatar tw-w-10 tw-h-10 tw-rounded-full tw-overflow-hidden tw-bg-gray-200 tw-border-2 tw-shadow-sm tw-cursor-pointer hover:tw-shadow\"\n style=\"border-color: var(--cide-theme-sidebar-color);\">\n <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADACAMAAAB/Pny7AAAA8FBMVEX///8Qdv8QUuf///0QUegNdP////sAcv8Ab/8Abf/M4vASX+8Ab/3n7vgAbvgETufR4PP0//sAaf0ASeU6YuMyW+fe8PcAafbC1velwfGWufCOsvL1/P3u9vh7qfh3pvgARucRWOu10vBglOmnxuw0fOValuYAbOdYk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=\"User\" class=\"tw-w-full tw-h-full tw-object-cover\"\n onerror=\"this.src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADACAMAAAB/Pny7AAAA8FBMVEX///8Qdv8QUuf///0QUegNdP////sAcv8Ab/8Abf/M4vASX+8Ab/3n7vgAbvgETufR4PP0//sAaf0ASeU6YuMyW+fe8PcAafbC1velwfGWufCOsvL1/P3u9vh7qfh3pvgARucRWOu10vBglOmnxuw0fOValuYAbOdYk/EAYPgAZ+o9hPJMi+TH3/duoONwnuwdefe0yvRunfZ6pe1LiOk6gfuRu+y11eurvuU3YtmRpuCitOO7xuvG1OlJjPYdc+iNnOFOcOFceOJlg93Jz+wANt6kte58kNp1kOgAQMkZOdQOTNUAKNkfU9FMb9I9Zs4gMZ6mAAAPKUlEQVR4nO1dC1fiuhZum6ZFoA+sFIH2TAUclQ6KgzoKPlB08Dgz3v//b26StohjH0la1LMW39KjI5yGr/uRnb13E0FYY4011lhjjTXWWGONNdbgBgi+AfkG+Af5JXxl8QP9BYAP+oj0AITDCxnl1b+E5X98fjLBxwXRpwWOa9smgW27DpFQ+Mp/gQthowhCrdxpjbon/inCkHydnu6edEetTrmG3qb8FyRDbrrdO9zVdRGKIkRQYQhVxb+Kur572LPBwoo+HxAJBYtEsXtf9yqbVVUUMZkElDYre197NpajsOwdPg2Q3rj2mV85QLc/kcULYHWz75/ZrvAZTQi4ZvMEiYSGSAR1s/KtabpYOsqnIYM+jbY92ttUg3tOyYe8T93cG21riqB8NAchcsSK2dzXNyAxElrJwOitcEPfb5rhvPOhPo5oiNm+blQZtOsNqo3rtrmYVD+MCxq73PYbah4qGGpE5wMlAwS75eu5qWCNU/Xrlg0+UDIA9HwxfUZhgCr6vY+QTHAHQbmrq4XwCAH1rh24gXflQqKrs34BCvaajdo/w1POO7MBwD45KJgKZiMe7NrK+9oNilx6/Y3iuWCo/Z77vly0kV6ksUQg11T1kfZeTk1RgDLYb6yAyoKRvj94H7eGRnF6fml1XDBKfs95Hz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vmNzY3AFxA3oOPbH0vI8B4eLsaaC1LPEPhgBEcdl6IjgtUl65CCqVGWMZF/Zz37HVZfeRCkj/Eh1KIenHBUIlmZpfyMZDxdzM9xAAYyN6f4YCz8a3g8+K5/Q/JlCFsXt8+z+fi87ArhkycrXuHnRrSiCicMfHC7eYVhmrYWZY1f5sZPzSVMc4VMwkdlFq8sfv/AM4DXWGONNdZYY4011lhjjTU+I/4P0EdBunobKkUAAAAASUVORK5CYII='\">\n <!-- Modern Status Indicator Circle -->\n <div class=\"tw-absolute -tw-bottom-0.5 -tw-right-0.5 tw-w-3.5 tw-h-3.5 tw-rounded-full tw-border-2 tw-border-white tw-shadow-sm tw-transition-all tw-duration-200\n {{getUserStatusClass()}}\" [cideEleTooltip]=\"getUserStatusText()\"\n tooltipPlacement=\"left\">\n <!-- Pulse animation for active status -->\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-animate-pulse tw-opacity-50\n {{getUserStatusClass()}}\"></div>\n </div>\n </div>\n\n <!-- Enhanced User dropdown menu with modern status options -->\n <div *ngIf=\"showUserMenu\"\n class=\"user-menu tw-absolute tw-left-full tw-bottom-0 tw-mt-2 tw-ml-2 tw-w-72 tw-rounded-xl tw-shadow-2xl tw-bg-white tw-ring-1 tw-ring-black/5 tw-divide-y tw-divide-gray-100 tw-z-50 tw-backdrop-blur-sm\">\n\n <!-- Enhanced User Info Section -->\n <div class=\"tw-p-5 tw-bg-gradient-to-br tw-from-blue-50 tw-to-indigo-50\">\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <div class=\"tw-relative\">\n <div\n class=\"tw-w-12 tw-h-12 tw-rounded-xl tw-bg-gradient-to-br tw-from-blue-500 tw-via-purple-500 tw-to-indigo-600 tw-flex tw-items-center tw-justify-center tw-text-white tw-font-semibold tw-text-lg tw-shadow-lg\">\n JD\n </div>\n <!-- Enhanced status indicator -->\n <div class=\"tw-absolute -tw-bottom-1 -tw-right-1 tw-w-4 tw-h-4 tw-rounded-full tw-border-2 tw-border-white tw-shadow-md tw-transition-all tw-duration-300\"\n [class]=\"getUserStatusClass()\" [title]=\"getUserStatusText()\">\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-animate-pulse tw-opacity-50\"\n [class]=\"getUserStatusClass()\"></div>\n </div>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <div class=\"tw-text-base tw-font-semibold tw-text-gray-900 tw-truncate\">John Doe</div>\n <div class=\"tw-text-sm tw-text-gray-600 tw-truncate\">john.doe&#64;company.com</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1 tw-flex tw-items-center tw-gap-1\">\n <div class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-500 tw-animate-pulse\">\n </div>\n <span>Active now</span>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Enhanced Status Selection Section -->\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-5 tw-h-5 tw-rounded-md tw-bg-blue-100 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon type=\"none\" size=\"2xs\"\n class=\"tw-text-blue-600\">radio_button_checked</cide-ele-icon>\n </div>\n Set Status\n </h4>\n <span\n class=\"tw-text-xs tw-text-gray-500 tw-bg-gray-100 tw-px-2 tw-py-1 tw-rounded-full\">Auto-away\n in 5min</span>\n </div>\n\n <div class=\"tw-space-y-1\">\n <button (click)=\"setUserStatus('online')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-green-50 tw-group\"\n [class.tw-bg-green-50]=\"userStatusService.userStatus().status === 'online'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'online'\"\n [class.tw-ring-green-200]=\"userStatusService.userStatus().status === 'online'\">\n <div class=\"tw-relative\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-green-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n <div class=\"tw-absolute tw-inset-0 tw-rounded-full tw-bg-green-500 tw-animate-ping tw-opacity-75\"\n *ngIf=\"userStatusService.userStatus().status === 'online'\"></div>\n </div>\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Online</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'online'\" type=\"none\"\n size=\"xs\" class=\"tw-text-green-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('away')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-yellow-50 tw-group\"\n [class.tw-bg-yellow-50]=\"userStatusService.userStatus().status === 'away'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'away'\"\n [class.tw-ring-yellow-200]=\"userStatusService.userStatus().status === 'away'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-yellow-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Away</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'away'\" type=\"none\"\n size=\"xs\" class=\"tw-text-yellow-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('busy')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-orange-50 tw-group\"\n [class.tw-bg-orange-50]=\"userStatusService.userStatus().status === 'busy'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'busy'\"\n [class.tw-ring-orange-200]=\"userStatusService.userStatus().status === 'busy'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-orange-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Busy</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'busy'\" type=\"none\"\n size=\"xs\" class=\"tw-text-orange-600\">check</cide-ele-icon>\n </button>\n\n <button (click)=\"setUserStatus('do-not-disturb')\"\n class=\"status-option tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-text-sm tw-rounded-lg tw-transition-all tw-duration-200 hover:tw-bg-red-50 tw-group\"\n [class.tw-bg-red-50]=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n [class.tw-ring-2]=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n [class.tw-ring-red-200]=\"userStatusService.userStatus().status === 'do-not-disturb'\">\n <div\n class=\"tw-w-3 tw-h-3 tw-rounded-full tw-bg-red-500 tw-shadow-sm group-hover:tw-scale-110 tw-transition-transform\">\n </div>\n <span class=\"tw-text-gray-700 tw-font-medium tw-flex-1\">Do not disturb</span>\n <cide-ele-icon *ngIf=\"userStatusService.userStatus().status === 'do-not-disturb'\"\n type=\"none\" size=\"xs\" class=\"tw-text-red-600\">check</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Enhanced Quick Actions Section -->\n <div class=\"tw-p-4 tw-bg-gray-50/50\">\n <h4\n class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3 tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-5 tw-h-5 tw-rounded-md tw-bg-gray-100 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon type=\"none\" size=\"2xs\" class=\"tw-text-gray-600\">bolt</cide-ele-icon>\n </div>\n Quick Actions\n </h4>\n <div class=\"tw-space-y-1\">\n <a href=\"#\"\n class=\"quick-action tw-group tw-flex tw-items-center tw-px-3 tw-py-2 tw-text-sm tw-text-gray-700 tw-rounded-lg hover:tw-bg-white tw-transition-all tw-duration-200\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-blue-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-blue-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-text-blue-600\">person</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">View Profile</span>\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-400 group-hover:tw-text-gray-600 tw-transition-colors\">chevron_right</cide-ele-icon>\n </a>\n <a href=\"#\"\n class=\"quick-action tw-group tw-flex tw-items-center tw-px-3 tw-py-2 tw-text-sm tw-text-gray-700 tw-rounded-lg hover:tw-bg-white tw-transition-all tw-duration-200\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-gray-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-gray-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-600\">settings</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">Preferences</span>\n <cide-ele-icon type=\"none\" size=\"xs\"\n class=\"tw-text-gray-400 group-hover:tw-text-gray-600 tw-transition-colors\">chevron_right</cide-ele-icon>\n </a>\n </div>\n </div>\n\n <!-- Enhanced Sign Out Section -->\n <div class=\"tw-p-4\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-3 tw-py-2.5 tw-text-sm tw-text-red-600 tw-rounded-lg hover:tw-bg-red-50 tw-transition-all tw-duration-200 tw-font-medium\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-lg tw-bg-red-100 tw-flex tw-items-center tw-justify-center tw-mr-3 group-hover:tw-bg-red-200 tw-transition-colors\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-text-red-600\">logout</cide-ele-icon>\n </div>\n <span class=\"tw-flex-1\">Sign out</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div> <!-- Second tier sidebar (Expanded view) -->\n <div class=\"cide-lyt-sidebar-menu tw-h-full tw-overflow-hidden tw-shadow-sm\">\n <div class=\"tw-flex tw-flex-col tw-h-full\">\n <!-- Header section with search and options -->\n <div class=\"sidebar-header tw-p-4 tw-border-b tw-border-gray-100\">\n <!-- Title with back button - Clean layout without online indicator -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-mb-4\">\n <button\n class=\"back-button tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors tw-flex-shrink-0\"\n [cideEleTooltip]=\"'Back to home'\" tooltipPlacement=\"bottom\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-transition-transform hover:tw-scale-110\">{{\n getActiveModuleIcon() }}</cide-ele-icon>\n </button>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h2 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-leading-5\">\n {{ appState.getActiveModuleTitle() || 'Menu' }}\n </h2>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-mt-0.5\">\n Module Dashboard\n </p>\n </div>\n </div>\n\n <!-- Search and options -->\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"search-wrapper tw-relative tw-flex-1\">\n <cide-ele-input type=\"text\" leadingIcon=\"search\" size=\"xs\" placeholder=\"Search settings...\"\n [clearInput]=\"true\" [(ngModel)]=\"searchText\" (input)=\"onSearch()\">\n </cide-ele-input>\n <div\n class=\"search-shortcut tw-absolute tw-right-3 tw-top-1/2 -tw-translate-y-1/2 tw-bg-gray-100 tw-text-gray-500 tw-rounded tw-px-1.5 tw-py-0.5 tw-text-xs\">\n \u2318K</div>\n </div>\n <button\n class=\"tw-ml-2 tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors\"\n (click)=\"toggleOptions()\">\n <cide-ele-icon type=\"none\" size=\"xs\">more_vert</cide-ele-icon>\n </button>\n\n <!-- Options dropdown menu -->\n <div *ngIf=\"showOptions\"\n class=\"options-menu tw-absolute tw-right-4 tw-top-16 tw-mt-2 tw-w-48 tw-rounded-md tw-shadow-lg tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-divide-y tw-divide-gray-100 tw-z-10\">\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">refresh</cide-ele-icon>\n Refresh\n </a>\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">sync</cide-ele-icon>\n Sync settings\n </a>\n </div>\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">help_outline</cide-ele-icon>\n Help & support\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Menu items with categories -->\n <div class=\"sidebar-content tw-overflow-y-auto tw-flex-1\" (scroll)=\"onScroll($event)\">\n <!-- Search results if searching -->\n <div *ngIf=\"searchText\" class=\"sidebar-section tw-p-4\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500\">SEARCH RESULTS</h3>\n <span class=\"tw-text-xs tw-text-gray-500\">{{searchResults.length}} items</span>\n </div>\n\n <div *ngIf=\"searchResults.length > 0\" class=\"tw-space-y-1\">\n <a *ngFor=\"let item of searchResults\" href=\"#\"\n class=\"menu-item tw-flex tw-items-center tw-px-3 tw-py-2 tw-rounded-md hover:tw-bg-gray-50\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{item.icon}}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{item.title}}</span>\n </a>\n </div>\n\n <div *ngIf=\"searchResults.length === 0\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">search_off</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No results for \"{{searchText}}\"</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Try another search term</p>\n </div>\n </div>\n\n <!-- Only show these sections if not searching -->\n <ng-container *ngIf=\"!searchText\">\n <!-- Loading state -->\n <div *ngIf=\"loadingMenus\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-spinner variant=\"circle\" size=\"xs\"></cide-ele-spinner>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">Loading menus...</p>\n </div>\n\n <!-- Dynamic menu tree -->\n <div *ngIf=\"!loadingMenus && menuLoadComplete\" class=\"sidebar-section tw-p-4\"\n [class.animate-in]=\"animateSections[0]\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: selectedModuleMenus, level: 0}\"></ng-container>\n </div>\n\n <!-- Empty state -->\n <div *ngIf=\"!loadingMenus && menuLoadComplete && selectedModuleMenus.length === 0\"\n class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">folder_open</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No menus available</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Select a module to view its menus</p>\n </div>\n </ng-container>\n\n <!-- Recursive menu template -->\n <ng-template #recursiveMenu let-menus let-level=\"level\">\n <div [class.tw-ml-0]=\"level > 0\">\n <div *ngFor=\"let menu of menus\" class=\"tw-mb-2\">\n <!-- Title type items (section headers) -->\n <div *ngIf=\"menu.syme_type === 'title'\" class=\"tw-mb-3\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500 tw-uppercase tw-mb-2\">{{\n menu.syme_title }}</h3>\n <!-- Render children of title -->\n <ng-container *ngIf=\"menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n\n <!-- Section type items (collapsible sections) -->\n <div *ngIf=\"menu.syme_type === 'section'\" class=\"tw-mb-2\">\n <!-- Section header (clickable to expand/collapse) -->\n <button \n (click)=\"toggleSection(menu._id)\"\n (keydown.enter)=\"toggleSection(menu._id)\"\n (keydown.space)=\"toggleSection(menu._id)\"\n class=\"section-header tw-w-full tw-flex tw-items-center tw-px-3 tw-py-2 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors tw-text-left\"\n [class.tw-bg-blue-50]=\"isSectionExpanded(menu._id)\"\n type=\"button\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"isSectionExpanded(menu._id)\"\n [attr.aria-label]=\"'Toggle ' + menu.syme_title + ' section'\">\n \n <!-- Section Icon (left side, like other menu items) -->\n <cide-ele-icon \n class=\"tw-mr-3 tw-text-gray-500\" \n type=\"none\"\n size=\"xs\">{{ menu.syme_icon || 'folder' }}</cide-ele-icon>\n \n <!-- Section Title -->\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-800\">{{ menu.syme_title }}</span>\n \n <!-- Right side icons container -->\n <div class=\"tw-ml-auto tw-flex tw-items-center tw-space-x-2\">\n <!-- Child Count Badge -->\n <span \n *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-px-2 tw-py-0.5 tw-bg-gray-200 tw-text-gray-600 tw-rounded-full tw-text-xs tw-font-medium\">\n {{ menu.children.length }}\n </span>\n \n <!-- Expand/Collapse Icon (right side) -->\n <cide-ele-icon \n class=\"tw-text-gray-400 tw-transition-transform tw-duration-200\"\n [class.tw-rotate-90]=\"isSectionExpanded(menu._id)\"\n type=\"none\" \n size=\"2xs\">chevron_right</cide-ele-icon>\n </div>\n </button>\n\n <!-- Section Content (collapsible) -->\n <div \n *ngIf=\"isSectionExpanded(menu._id) && menu.children && menu.children.length > 0\"\n class=\"section-content tw-mt-2 tw-ml-2 tw-border-l tw-border-gray-200 tw-pl-3\"\n [@slideInOut]=\"isSectionExpanded(menu._id) ? 'in' : 'out'\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </div>\n </div>\n\n <!-- Menu type items (clickable links) -->\n <a *ngIf=\"menu.syme_type === 'menu'\" (click)=\"onMenuClick(menu)\"\n (keydown.enter)=\"onMenuClick(menu)\" (keydown.space)=\"onMenuClick(menu)\" tabindex=\"0\"\n role=\"button\"\n class=\"menu-item tw-flex tw-items-center tw-px-1 tw-py-1 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors\">\n <cide-ele-icon *ngIf=\"menu.syme_icon\" class=\"tw-mr-3 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{ menu.syme_icon }}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{ menu.syme_title }}</span>\n <cide-ele-icon *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-ml-auto tw-text-gray-400\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </a>\n\n <!-- Render nested children for menu items -->\n <ng-container\n *ngIf=\"menu.syme_type === 'menu' && menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Notification panel (overlays content when shown) -->\n <div *ngIf=\"showNotifications\" class=\"notification-panel tw-absolute tw-inset-0 tw-bg-white tw-z-20\">\n <div class=\"tw-p-4 tw-border-b tw-border-gray-100 tw-flex tw-justify-between tw-items-center\">\n <h3 class=\"tw-text-sm tw-font-medium\">Notifications</h3>\n <button class=\"tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100\"\n (click)=\"toggleNotificationsPanel()\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <div class=\"tw-text-xs tw-text-gray-500\">Today</div>\n <button class=\"tw-text-xs tw-text-blue-500\">Mark all as read</button>\n </div>\n\n <div class=\"tw-space-y-3\">\n <div\n class=\"notification-item tw-p-3 tw-bg-blue-50 tw-rounded-lg tw-border-l-4 tw-border-blue-500\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-flex tw-items-center tw-justify-center tw-text-blue-500\">\n <cide-ele-icon type=\"none\" size=\"xs\">notifications</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">New feature available</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">Try our new analytics dashboard\n with improved visualizations.</div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">Just now</div>\n </div>\n </div>\n </div>\n\n <div class=\"notification-item tw-p-3 tw-rounded-lg tw-border-l-4 tw-border-transparent\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-gray-100 tw-flex tw-items-center tw-justify-center tw-text-gray-500\">\n <cide-ele-icon type=\"none\" size=\"xs\">person_add</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">New team member</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">Jane Smith has joined your team.\n </div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">2 hours ago</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Storage info at bottom -->\n <div class=\"sidebar-footer tw-p-4 tw-border-t tw-border-gray-100\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-icon class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">cloud_upload</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">Storage</span>\n </div>\n <button\n class=\"upgrade-button tw-text-xs tw-text-blue-500 tw-font-medium tw-px-2 tw-py-1 tw-rounded hover:tw-bg-blue-50 tw-transition-colors\">Upgrade</button>\n </div>\n <div class=\"storage-bar tw-bg-gray-200 tw-rounded-full tw-h-1.5\">\n <div class=\"storage-fill tw-bg-blue-500 tw-h-1.5 tw-rounded-full tw-transition-all\"\n style=\"width: 75%\"></div>\n </div>\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mt-1.5\">\n <div class=\"tw-text-xs tw-text-gray-500\">18.2 GB of 20 GB used</div>\n <div class=\"tw-text-xs tw-text-blue-500\">75%</div>\n </div>\n\n <!-- Plan features quick view -->\n <div\n class=\"plan-features tw-flex tw-items-center tw-justify-between tw-mt-3 tw-pt-3 tw-border-t tw-border-gray-100\">\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-gray-700\">Free Plan</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Basic features</span>\n </div>\n <div class=\"tw-flex tw-gap-2\">\n <button\n class=\"tw-text-xs tw-bg-white tw-border tw-border-gray-200 tw-text-gray-700 tw-py-1 tw-px-2 tw-rounded hover:tw-bg-gray-50 tw-transition-colors\">Compare\n Plans</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-sidebar-page-inner-wrapper\"\n [minPrevSize]=\"sidebarSetupData.cide_lyt_sidebar_width\" prevElementSelector=\"#cide-lyt-sidebar-page\"\n nextElementSelector=\"#cide-lyt-page-wrapper\" cideEleResizer direction=\"horizontal\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n</nav>", styles: [".cide-lyt-sidebar{display:flex;box-shadow:0 4px 12px #0000000d;overflow:hidden;background-color:var(--cide-theme-sidebar-color);--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);--sidebar-shadow-color: rgba(0, 0, 0, .05);transition:width .3s cubic-bezier(.4,0,.2,1);max-height:100%;isolation:isolate;will-change:width;position:relative}.cide-lyt-sidebar.collapsed{animation:collapseEffect .3s forwards}.cide-lyt-sidebar:not(.collapsed){animation:expandEffect .3s forwards}@keyframes collapseEffect{0%{box-shadow:0 4px 12px var(--sidebar-shadow-color)}to{box-shadow:0 2px 8px var(--sidebar-shadow-color)}}@keyframes expandEffect{0%{box-shadow:0 2px 8px var(--sidebar-shadow-color)}to{box-shadow:0 4px 12px var(--sidebar-shadow-color)}}.cide-lyt-sidebar.animating{transition:width .3s cubic-bezier(.25,.46,.45,.94)}.cide-lyt-sidebar.collapsed .cide-lyt-sidebar-menu{width:0;opacity:0;visibility:hidden;transform:translate(-10px)}.cide-lyt-stack{background:linear-gradient(to bottom,var(--cide-theme-sidebar-color),var(--cide-theme-light-color));z-index:10;border-right:1px solid var(--cide-theme-light-color);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:0 0 1.5rem;transition:all .3s cubic-bezier(.4,0,.2,1);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--cide-theme-color-brand-primary) transparent;position:relative;will-change:transform;scroll-behavior:smooth;box-shadow:inset -1px 0 0 var(--sidebar-shadow-color)}.cide-lyt-stack:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(to top,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.cide-lyt-stack:before{content:\"\";position:absolute;top:0;left:0;right:0;height:30px;background:linear-gradient(to bottom,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.cide-lyt-stack.scrolled-down:before{opacity:1}.cide-lyt-stack.scrolled-up:after{opacity:1}.cide-lyt-stack{position:relative;z-index:1;-webkit-overflow-scrolling:touch;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--cide-theme-color-brand-primary) transparent}.cide-lyt-stack::-webkit-scrollbar{width:2px}.cide-lyt-stack::-webkit-scrollbar-track{background:transparent;margin:10px 0}.cide-lyt-stack::-webkit-scrollbar-thumb{background:var(--cide-theme-color-brand-primary);border-radius:4px;box-shadow:0 0 6px var(--cide-theme-color-brand-primary)}.cide-lyt-stack:hover::-webkit-scrollbar-thumb{background:var(--cide-theme-color-brand-primary);box-shadow:0 0 10px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.4)}.cide-lyt-stack:hover::-webkit-scrollbar{width:3px}.cide-lyt-stack:before,.cide-lyt-stack:after,.sidebar-content:before,.sidebar-content:after,.notification-panel:before,.notification-panel:after,.user-menu:before,.user-menu:after,.options-menu:before,.options-menu:after{content:\"\";position:absolute;left:0;right:0;height:24px;z-index:5;pointer-events:none;opacity:0;transition:opacity .3s ease}.cide-lyt-stack:before,.sidebar-content:before,.notification-panel:before,.user-menu:before,.options-menu:before{top:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),#fff0)}.cide-lyt-stack:after,.sidebar-content:after,.notification-panel:after,.user-menu:after,.options-menu:after{bottom:0;background:linear-gradient(to top,color-mix(in srgb,var(--cide-theme-sidebar-color) 90%,transparent),#fff0)}.cide-lyt-stack.is-scrollable-top:before,.sidebar-content.is-scrollable-top:before,.notification-panel.is-scrollable-top:before,.user-menu.is-scrollable-top:before,.options-menu.is-scrollable-top:before{opacity:1}.cide-lyt-stack.is-scrollable-bottom:after,.sidebar-content.is-scrollable-bottom:after,.notification-panel.is-scrollable-bottom:after,.user-menu.is-scrollable-bottom:after,.options-menu.is-scrollable-bottom:after{opacity:1}.collapse-toggle{margin-bottom:.5rem;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:5;border-radius:50%;overflow:hidden}.collapse-toggle:before{content:\"\";position:absolute;inset:0;background:var(--cide-theme-label-color);opacity:0;transition:opacity .2s ease;z-index:-1}.collapse-toggle:hover{transform:scale(1.1)}.collapse-toggle:hover:before{opacity:1}.collapse-toggle:active{transform:scale(.95);transition:transform .1s ease}.collapse-toggle:focus-visible{outline:2px solid var(--cide-theme-color-brand-primary);outline-offset:2px}.sidebar-scroll-content{width:100%;padding-top:.75rem;position:relative;z-index:1;overflow-y:auto;overflow-x:hidden;flex-grow:1;display:flex;flex-direction:column;align-items:center;padding:1rem 0;gap:.5rem;max-height:calc(100% - 8rem)}.nav-item{position:relative;width:30px;height:30px;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;margin:4px 0;border-radius:10px;box-shadow:0 0 #3b82f600;transform-origin:center;overflow:hidden;color:var(--cide-theme-text-color)}.nav-item:before{content:\"\";position:absolute;inset:0;background:radial-gradient(circle at center,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.01));opacity:0;transition:opacity .3s ease;z-index:-1}.nav-item:hover{background-color:color-mix(in srgb,var(--cide-theme-light-color) 90%,transparent);transform:translateY(-1px);box-shadow:0 2px 6px var(--cide-theme-shadow-color)}.nav-item:hover:before{opacity:1}.nav-item:active{transition:all .1s ease;transform:translateY(-1px);box-shadow:0 2px 6px var(--cide-theme-shadow-color)}.nav-item:active{transform:translateY(1px);transition:all .1s ease}.nav-item-active{background:linear-gradient(135deg,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.12));box-shadow:0 2px 8px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.15);transform:translateZ(0);color:var(--cide-theme-color-brand-primary)}.nav-item-active:after{content:\"\";position:absolute;bottom:-2px;left:30%;right:30%;height:2px;background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0),var(--cide-theme-color-brand-primary),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));border-radius:1px;animation:pulseGlow 2s infinite}@keyframes pulseGlow{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}.nav-item-active:hover{background:linear-gradient(135deg,#3b82f61a,#3b82f626)}.nav-badge{z-index:5;transition:all .3s ease}.nav-item:hover .nav-badge{transform:scale(1.1)}.nav-tooltip{position:fixed;left:64px;top:50%;transform:translateY(-50%) translate(-5px);background-color:var(--sidebar-tooltip-bg);color:var(--sidebar-tooltip-color);padding:.4rem .75rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:0 2px 8px var(--cide-theme-shadow-color);letter-spacing:.01em;will-change:transform,opacity;max-width:220px;text-overflow:ellipsis;overflow:hidden;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.nav-tooltip:before{content:\"\";position:absolute;top:50%;right:100%;transform:translateY(-50%);border-width:6px;border-style:solid;border-color:transparent var(--sidebar-tooltip-bg) transparent transparent;filter:drop-shadow(-2px 0px 1px rgba(0,0,0,.1))}.nav-item:hover .nav-tooltip{opacity:1;transform:translateY(-50%) translate(0);box-shadow:0 3px 12px var(--cide-theme-shadow-color)}.nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 10%,var(--cide-theme-light-color));border-radius:.5rem}.nav-item-active:before{opacity:0}.active-nav-icon{color:var(--cide-lyt-sidebar-nav-item-color-active)!important;filter:drop-shadow(0 0 3px rgba(59,130,246,.3))}.nav-indicator{position:absolute;left:-8px;top:50%;transform:translateY(-50%);width:3px;height:60%;background:var(--cide-theme-color-brand-primary);border-radius:0 4px 4px 0;opacity:0;transition:all .3s ease;box-shadow:0 0 6px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.5)}.nav-item-active .nav-indicator{opacity:1;left:0}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.sidebar-scroll-content .nav-item{opacity:0;animation:fadeSlideIn .5s forwards}.sidebar-scroll-content .nav-item:nth-child(1){animation-delay:.05s}.sidebar-scroll-content .nav-item:nth-child(2){animation-delay:.1s}.sidebar-scroll-content .nav-item:nth-child(3){animation-delay:.15s}.sidebar-scroll-content .nav-item:nth-child(4){animation-delay:.2s}.sidebar-scroll-content .nav-item:nth-child(5){animation-delay:.25s}.sidebar-scroll-content .nav-item:nth-child(6){animation-delay:.3s}.sidebar-scroll-content .nav-item:nth-child(7){animation-delay:.35s}.sidebar-scroll-content .nav-item:nth-child(8){animation-delay:.4s}.sidebar-scroll-content .nav-item:nth-child(9){animation-delay:.45s}.sidebar-scroll-content .nav-item:nth-child(10){animation-delay:.5s}.sidebar-scroll-content .nav-item:nth-child(11){animation-delay:.55s}.sidebar-scroll-content .nav-item:nth-child(12){animation-delay:.6s}.sidebar-scroll-content .nav-item:nth-child(13){animation-delay:.65s}.sidebar-scroll-content .nav-item:nth-child(14){animation-delay:.7s}.sidebar-scroll-content .nav-item:nth-child(15){animation-delay:.75s}cide-ele-icon[type=box]{cursor:pointer;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}cide-ele-icon[type=box]:hover{background-color:#f3f4f6;transform:translateY(-1px)}cide-ele-icon[type=box]:active{transform:translateY(0)}.theme-toggle{position:relative;overflow:hidden;padding:.5rem;border-radius:12px;background-color:transparent;border:2px solid transparent;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem}.theme-toggle:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:radial-gradient(circle at center,rgba(59,130,246,.2) 0%,transparent 70%);opacity:0;transition:opacity .3s ease;border-radius:.5rem}.theme-toggle:hover{background-color:var(--cide-theme-hover-bg-color, rgba(243, 244, 246, 1));border-color:var(--cide-theme-color-brand-primary, rgba(59, 130, 246, .3));transform:translateY(-1px);box-shadow:0 4px 12px #0000001a}.theme-toggle:hover:after{opacity:1}.theme-toggle:focus{outline:none;box-shadow:0 0 0 3px #3b82f64d}.theme-toggle cide-ele-icon{color:var(--cide-theme-icon-color, #6b7280);transition:all .2s ease;width:1.25rem;height:1.25rem;display:flex;align-items:center;justify-content:center}.theme-toggle:hover cide-ele-icon{color:var(--cide-theme-color-brand-primary, #3b82f6);transform:scale(1.1) rotate(10deg)}.dark-mode .theme-toggle:after{background:radial-gradient(circle at center,rgba(96,165,250,.2) 0%,transparent 70%)}.dark-mode .theme-toggle:hover{background-color:var(--cide-theme-dark-hover-bg-color, rgba(55, 65, 81, 1));border-color:var(--cide-theme-color-brand-primary, rgba(96, 165, 250, .3))}.notification-badge{font-size:.65rem;min-width:20px;height:20px;box-shadow:0 2px 4px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.25);transform-origin:center;position:relative;animation:pulseNotification 2s infinite;overflow:hidden;background-color:var(--cide-theme-color-brand-primary);color:var(--cide-theme-light-color)}.notification-badge:before{content:\"\";position:absolute;inset:0;background:linear-gradient(135deg,#ffffff4d,#fff0);opacity:0;transition:opacity .3s ease}.notification-badge:hover:before{opacity:1}@keyframes pulseNotification{0%{box-shadow:0 0 rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.4);transform:scale(1)}40%{transform:translateY(-5px)}50%{box-shadow:0 0 0 4px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0);transform:scale(1.05)}60%{transform:translateY(-2px)}to{box-shadow:0 0 rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0);transform:scale(1)}}.user-avatar{transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;box-shadow:0 2px 5px #00000014;z-index:2}.user-avatar:hover{transform:scale(1.08);box-shadow:0 4px 12px #00000026}.user-avatar:before{content:\"\";position:absolute;inset:-3px;background:radial-gradient(circle,rgba(59,130,246,.3),transparent 70%);opacity:0;transition:opacity .3s ease;z-index:-1;border-radius:50%}.user-avatar:hover:before{opacity:1}.user-status{position:absolute;bottom:0;right:0;width:10px;height:10px;border-radius:50%;border:2px solid white;transition:all .3s ease}.user-status.online{background-color:#10b981;animation:statusPulse 2s infinite}.user-status.busy{background-color:#f59e0b}.user-status.offline{background-color:#6b7280}.user-status.dnd{background-color:#ef4444}@keyframes statusPulse{0%{box-shadow:0 0 #10b98166}70%{box-shadow:0 0 0 6px #10b98100}to{box-shadow:0 0 #10b98100}}.dark-mode .user-avatar{box-shadow:0 2px 5px #0003}.dark-mode .user-avatar:before{background:radial-gradient(circle,rgba(96,165,250,.4),transparent 70%)}.dark-mode .user-status{border-color:#0f172a}.user-dropdown{position:relative}.user-menu{animation:fadeInUp .2s cubic-bezier(.4,0,.2,1);z-index:30;margin-left:10px;margin-bottom:5px;max-height:80vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;box-shadow:0 10px 25px #0000001a;border-radius:.75rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);position:absolute;left:100%;bottom:0;margin-top:.5rem;margin-left:.5rem;width:14rem;border-radius:.375rem;box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color);background-color:var(--cide-theme-sidebar-color);border:1px solid var(--cide-theme-border-color);z-index:50;overflow:hidden}.user-menu a{color:var(--cide-theme-text-color);transition:background-color .2s ease}.user-menu a:hover{background-color:var(--cide-theme-hover-bg-color)}.user-menu .tw-text-red-700{color:var(--cide-theme-error-color)}.user-menu::-webkit-scrollbar{width:3px}.user-menu::-webkit-scrollbar-track{background:transparent}.user-menu::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.user-status{transition:all .3s ease;box-shadow:0 0 0 2px var(--cide-theme-sidebar-color)}.user-status.online{animation:pulseOnline 2s infinite}@keyframes pulseOnline{0%{box-shadow:0 0 #22c55e66,0 0 0 2px var(--cide-theme-sidebar-color)}70%{box-shadow:0 0 0 4px #22c55e00,0 0 0 2px var(--cide-theme-sidebar-color)}to{box-shadow:0 0 #22c55e00,0 0 0 2px var(--cide-theme-sidebar-color)}}.cide-lyt-sidebar-menu{width:auto;background-color:var(--cide-theme-sidebar-color);border-left:1px solid rgba(243,244,246,1);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;overflow:hidden;max-height:100%;position:relative;will-change:width,opacity,transform}.sidebar-header{background-color:var(--cide-theme-sidebar-color);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);position:sticky;top:0;z-index:10;border-bottom:1px solid rgba(243,244,246,.8);padding:1rem .75rem;transition:all .3s ease}.sidebar-header.scrolled{box-shadow:0 4px 10px -8px #0000001a}.back-button{transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%}.back-button:hover{transform:translate(-2px);background-color:#f3f4f6}.back-button:active{transform:translate(-1px) scale(.95)}.search-wrapper{position:relative;transition:all .3s ease}.search-wrapper:focus-within{transform:translateY(-1px)}.search-shortcut{font-size:.65rem;opacity:.7;letter-spacing:.02em;pointer-events:none;padding:.1rem .3rem;background-color:#f3f4f6cc;border-radius:.25rem;border:1px solid rgba(229,231,235,.8);transition:all .3s ease}.search-wrapper:focus-within .search-shortcut{opacity:.5}.options-menu{animation:fadeInUp .2s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000001a;max-height:70vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;border-radius:.75rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.options-menu::-webkit-scrollbar{width:3px}.options-menu::-webkit-scrollbar-track{background:transparent}.options-menu::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.sidebar-section{position:relative;padding:.5rem 0}.sidebar-section:not(:first-child):before{content:\"\";height:1px;background:linear-gradient(to right,#e5e7eb00,#e5e7eb80,#e5e7eb00);position:absolute;top:0;left:10%;right:10%}.tw-text-xs.tw-font-semibold.tw-text-gray-500{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;position:relative;display:inline-block;padding:0 .5rem;color:var(--cide-theme-label-color)}.tw-text-xs.tw-font-semibold.tw-text-gray-500:after{content:\"\";position:absolute;height:3px;width:2rem;background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.5),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));bottom:-4px;left:.5rem;border-radius:3px;transition:width .3s ease}.sidebar-section:hover .tw-text-xs.tw-font-semibold.tw-text-gray-500:after{width:3rem}.menu-item{text-decoration:none;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;margin:3px 0;border-radius:.5rem;transform:translateZ(0);color:var(--cide-theme-text-color)}.menu-item:hover{transform:translate(3px);background-color:var(--cide-theme-light-color);box-shadow:0 1px 3px var(--sidebar-shadow-color)}.active-menu-item{background-color:rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.08);position:relative;box-shadow:0 2px 5px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1)}.active-menu-item:after{content:\"\";position:absolute;left:0;top:0;height:100%;width:3px;background:linear-gradient(to bottom,var(--cide-theme-color-brand-primary),var(--cide-theme-secondary-color));border-radius:0 2px 2px 0;box-shadow:0 0 6px rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.3);animation:pulseLeftBorder 2s infinite}@keyframes pulseLeftBorder{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.dark-mode .active-menu-item{background-color:#1e293b80;box-shadow:0 2px 5px #0f172a33}.dark-mode .active-menu-item:after{background:linear-gradient(to bottom,#60a5fa,#3b82f6);box-shadow:0 0 8px #60a5fa66}.quick-actions{transition:all .3s ease;opacity:0;transform:translate(5px);z-index:2}.menu-item:hover .quick-actions{opacity:1;transform:translate(0)}.badge{font-size:.7rem;padding:1px 5px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;z-index:1}.menu-item:hover .badge{background-color:#d1d5db}.new-badge{animation:pulse 2s infinite;z-index:1}@keyframes pulse{0%{box-shadow:0 0 #3b82f666}70%{box-shadow:0 0 0 4px #3b82f600}to{box-shadow:0 0 #3b82f600}}.toggle-switch{display:inline-flex;align-items:center;transition:all .2s ease}.toggle-switch:hover{transform:scale(1.05)}.toggle-track{position:relative;cursor:pointer;transition:background-color .3s ease;overflow:hidden}.toggle-track:after{content:\"\";position:absolute;top:50%;left:50%;width:5px;height:5px;background:#ffffffb3;opacity:0;border-radius:100%;transform:scale(1) translate(-50%,-50%);transform-origin:50% 50%}.toggle-track.clicked:after{animation:ripple .6s ease-out}@keyframes ripple{0%{opacity:1;transform:scale(0) translate(-50%,-50%)}to{opacity:0;transform:scale(20) translate(-50%,-50%)}}.alert-box{animation:fadeIn .5s cubic-bezier(.4,0,.2,1);box-shadow:0 2px 8px #fde04726;border-radius:.5rem;position:relative;overflow:hidden}.alert-box:before{content:\"\";position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fef3c7' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E\");opacity:.3;pointer-events:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.notification-panel{animation:fadeIn .3s cubic-bezier(.4,0,.2,1);overflow-y:auto;max-height:100vh;scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;padding:.75rem;border-radius:.75rem}.notification-panel::-webkit-scrollbar{width:3px}.notification-panel::-webkit-scrollbar-track{background:transparent}.notification-panel::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.notification-panel:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.notification-item{transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;border-radius:.5rem;margin-bottom:.5rem;position:relative;overflow:hidden}.notification-item:hover{background-color:#f3f4f6;transform:translate(1px)}.notification-item:active{transform:scale(.99)}.notification-item.unread:before{content:\"\";position:absolute;left:0;top:0;height:100%;width:3px;background-color:var(--cide-theme-color-brand-primary);border-radius:0 2px 2px 0}.sidebar-footer{background-color:var(--cide-theme-light-color);position:sticky;bottom:0;z-index:10;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid rgba(243,244,246,.8);padding:.75rem;transition:all .3s ease}.upgrade-button{transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;border-radius:.5rem;color:var(--cide-theme-text-color)}.upgrade-button:hover{background-color:rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1);transform:translateY(-1px)}.upgrade-button:active{transform:translateY(0) scale(.98)}.upgrade-button:after{content:\"\";position:absolute;width:12px;height:12px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E\");top:5px;right:10px;opacity:.5;transform:scale(0);transition:all .3s ease}.upgrade-button:hover:after{transform:scale(1) rotate(20deg);animation:float 3s ease-in-out infinite}@keyframes float{0%,to{transform:scale(1) rotate(5deg) translate(0)}50%{transform:scale(1.1) rotate(-5deg) translate(-2px,-2px)}}.storage-bar{background-color:#e5e7eb80;overflow:hidden;border-radius:4px;height:6px;position:relative}.storage-fill{background:linear-gradient(to right,var(--cide-theme-color-brand-primary),var(--cide-theme-secondary-color));transition:width 1s cubic-bezier(.4,0,.2,1);position:relative;height:100%;border-radius:4px}.storage-fill:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,#fff0,#fff3,#fff0);animation:shimmer 2s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}.plan-features{transition:all .3s ease;padding:.5rem;border-radius:.5rem}.plan-features:hover{background-color:#f3f4f680}.feature-item{display:flex;align-items:center;margin:.25rem 0;position:relative;padding-left:1.25rem;color:var(--cide-theme-text-color)}.feature-item:before{content:\"\\2713\";position:absolute;left:0;color:var(--cide-theme-color-brand-primary);font-size:.7rem;top:50%;transform:translateY(-50%)}.sidebar-content{scrollbar-width:thin;scrollbar-color:rgba(209,213,219,.5) transparent;flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding:0 .75rem;transition:all .3s ease;position:relative;scroll-behavior:smooth;scroll-padding:1rem;overscroll-behavior:contain}.sidebar-content:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(to top,rgba(255,255,255,.9),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.sidebar-content:before{content:\"\";position:absolute;top:0;left:0;right:0;height:30px;background:linear-gradient(to bottom,rgba(255,255,255,.9),transparent);pointer-events:none;opacity:0;transition:opacity .3s ease;z-index:2}.sidebar-content.scrolled-down:before{opacity:1}.sidebar-content.scrolled-up:after{opacity:1}.sidebar-content::-webkit-scrollbar{width:3px}.sidebar-content::-webkit-scrollbar-track{background:transparent}.sidebar-content::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.sidebar-content:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.cide-lyt-sidebar *::-webkit-scrollbar{width:3px}.cide-lyt-sidebar *::-webkit-scrollbar-track{background:transparent}.cide-lyt-sidebar *::-webkit-scrollbar-thumb{background-color:#d1d5db80;border-radius:20px}.cide-lyt-sidebar *:hover::-webkit-scrollbar-thumb{background-color:#9ca3af80}.sidebar-section{transition:all .3s ease-out;transform:translateY(0);opacity:1}.sidebar-section.animate-in{animation:slideInUp .4s cubic-bezier(.4,0,.2,1) forwards}@keyframes slideInUp{0%{opacity:.5;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}.sidebar-section:nth-child(1).animate-in{animation-delay:.1s}.sidebar-section:nth-child(2).animate-in{animation-delay:.2s}.sidebar-section:nth-child(3).animate-in{animation-delay:.3s}.sidebar-section:nth-child(4).animate-in{animation-delay:.4s}.sidebar-section:nth-child(5).animate-in{animation-delay:.5s}:host ::ng-deep cide-ele-input{width:100%}:host ::ng-deep .cide-input-field{border-radius:8px;background-color:#f9fafb;border:1px solid transparent;transition:all .2s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .cide-input-field:focus-within{border-color:#d1d5db;background-color:#fff;box-shadow:0 2px 8px #0000000d;transform:translateY(-1px)}.cide-lyt-sidebar *:focus{outline:none;box-shadow:0 0 0 2px #3b82f64d}.dark-mode{--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);background-color:#1e293b;color:var(--cide-theme-light-color)}.dark-mode .cide-lyt-stack{background-color:#0f172a;border-right-color:#1e293b}.dark-mode .cide-lyt-stack:before,.dark-mode .cide-lyt-stack:after,.dark-mode .sidebar-content:before,.dark-mode .sidebar-content:after{background:linear-gradient(to bottom,rgba(15,23,42,.9),transparent)}.dark-mode .sidebar-content:after,.dark-mode .cide-lyt-stack:after{background:linear-gradient(to top,rgba(15,23,42,.9),transparent)}.dark-mode .cide-lyt-sidebar-menu{background-color:#0f172a;border-left-color:#1e293b}.dark-mode .sidebar-header,.dark-mode .sidebar-footer{background-color:#0f172af2;border-color:#1e293b}.dark-mode .tw-text-gray-700{color:#e2e8f0}.dark-mode .tw-text-gray-500{color:#94a3b8}.dark-mode .tw-bg-gray-50,.dark-mode .menu-item:hover{background-color:#1e293b80}.dark-mode .tw-bg-gray-100{background-color:#1e293b}.dark-mode .tw-bg-gray-200{background-color:#334155}.dark-mode .nav-item:hover:before{background-color:#60a5fa1a}.dark-mode .back-button:hover{background-color:#1e293bb3}.dark-mode .sidebar-section:not(:first-child):before{background:linear-gradient(to right,#33415500,#33415580,#33415500)}.dark-mode .toggle-track:after{background:#00000080}.dark-mode .alert-box:before{opacity:.2}.dark-mode :host ::ng-deep .cide-input-field{background-color:#1e293b;color:#e2e8f0}.dark-mode :host ::ng-deep .cide-input-field:focus-within{border-color:#475569;background-color:#0f172a}.dark-mode *::-webkit-scrollbar-thumb{background-color:#47556980}.dark-mode *:hover::-webkit-scrollbar-thumb{background-color:#64748b99}.nav-item-active .nav-indicator{animation:pulseIndicator 2s infinite}@keyframes pulseIndicator{0%{box-shadow:0 0 #3b82f666}70%{box-shadow:0 0 0 3px #3b82f600}to{box-shadow:0 0 #3b82f600}}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}@media screen and (max-width: 1024px){.cide-lyt-sidebar-menu{width:220px}.sidebar-content{padding:0 .5rem}.tw-text-xs.tw-font-semibold.tw-text-gray-500{font-size:.65rem}}@media screen and (max-width: 768px){.cide-lyt-sidebar-menu{position:fixed;width:100%;max-width:280px;left:72px;z-index:40;box-shadow:0 10px 25px #00000026;border-radius:0 1rem 1rem 0}.cide-lyt-sidebar.collapsed .cide-lyt-sidebar-menu{left:-100%}.sidebar-overlay{position:fixed;inset:0;background-color:#0000004d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .3s ease;z-index:35}.sidebar-overlay.active{opacity:1;pointer-events:auto}}.cide-lyt-sidebar,.cide-lyt-stack,.cide-lyt-sidebar-menu,.sidebar-logo,.nav-item,.menu-item,.user-avatar,.upgrade-button,.storage-fill,.notification-item,.sidebar-section.animate-in{transform:translateZ(0);backface-visibility:hidden;perspective:1000px;will-change:transform,opacity}.dark-mode .nav-item-active{background:linear-gradient(135deg,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.15),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),.1));box-shadow:0 2px 8px #1e40af40}.dark-mode .nav-item-active:after{background:linear-gradient(to right,rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0),rgba(var(--cide-theme-secondary-color-rgb, 74, 222, 128),.6),rgba(var(--cide-theme-color-brand-primary-rgb, 59, 130, 246),0));box-shadow:0 0 5px rgba(var(--cide-theme-secondary-color-rgb, 74, 222, 128),.5)}.dark-mode .nav-item:hover{background-color:#33415580;box-shadow:0 2px 8px #0f172a4d}.dark-mode .nav-tooltip{background-color:#0f172ae6;box-shadow:0 3px 10px #0006;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.dark-mode .nav-tooltip:before{border-color:transparent rgba(15,23,42,.9) transparent transparent}.text-theme-primary{color:var(--cide-theme-color-brand-primary)}.text-theme-secondary{color:var(--cide-theme-secondary-color)}.text-theme-text{color:var(--cide-theme-text-color)}.text-theme-label{color:var(--cide-theme-label-color)}.bg-theme-primary{background-color:var(--cide-theme-color-brand-primary)}.bg-theme-secondary{background-color:var(--cide-theme-secondary-color)}.bg-theme-light{background-color:var(--cide-theme-light-color)}.bg-theme-dark{background-color:var(--cide-theme-dark-color)}.bg-theme-sidebar{background-color:var(--cide-theme-sidebar-color)}.border-theme-light{border-color:var(--cide-theme-light-color)}.border-theme-primary{border-color:var(--cide-theme-color-brand-primary)}.hover-bg-theme-light:hover{background-color:var(--cide-theme-light-color)}.hover-text-theme-primary:hover{color:var(--cide-theme-color-brand-primary)}.tw-text-gray-500{color:var(--cide-theme-icon-color)}.hover\\:tw-text-gray-700:hover{color:var(--cide-theme-icon-hover-color)}.tw-text-gray-700{color:var(--cide-theme-text-color)}.tw-text-red-500,.tw-text-red-600,.tw-text-red-700{color:var(--cide-theme-error-color)}.tw-bg-gray-200{background-color:var(--cide-theme-border-color)}.hover\\:tw-bg-gray-100:hover{background-color:var(--cide-theme-hover-bg-color)}.tw-bg-white{background-color:var(--cide-theme-sidebar-color)}.tw-bg-green-500{background-color:var(--cide-theme-success-color)}.tw-border-gray-100,.tw-divide-gray-100{border-color:var(--cide-theme-border-color)}.tw-shadow-lg{box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color)}.tw-shadow-sm,.hover\\:tw-shadow:hover{box-shadow:0 1px 2px 0 var(--cide-theme-shadow-color)}.active-nav-icon{color:var(--cide-theme-color-brand-primary)!important}.nav-item{display:flex;align-items:center;justify-content:center;position:relative;border-radius:.375rem}.nav-item:hover{background-color:var(--cide-theme-hover-bg-color)}.nav-item:hover cide-ele-icon{color:var(--cide-theme-icon-hover-color)}.nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 10%,var(--cide-theme-light-color))}.nav-item-active cide-ele-icon{color:var(--cide-theme-color-brand-primary)}.nav-indicator{opacity:0;transition:opacity .2s ease}.nav-item-active .nav-indicator{opacity:1}.nav-tooltip{position:absolute;left:100%;top:50%;transform:translateY(-50%);background-color:var(--sidebar-tooltip-bg);color:var(--sidebar-tooltip-color);padding:.25rem .5rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s ease;margin-left:.5rem;z-index:30;box-shadow:0 2px 8px var(--cide-theme-shadow-color)}.nav-item:hover .nav-tooltip{opacity:1}.nav-badge{position:absolute;top:-.25rem;right:-.25rem;width:.375rem;height:.375rem;border-radius:9999px;background-color:var(--cide-theme-error-color);animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.user-avatar{width:2.5rem;height:2.5rem;border-radius:9999px;overflow:hidden;background-color:var(--cide-theme-border-color);border:2px solid var(--cide-theme-sidebar-color);box-shadow:0 1px 2px var(--cide-theme-shadow-color);cursor:pointer;transition:box-shadow .2s ease}.user-avatar:hover{box-shadow:0 2px 4px var(--cide-theme-shadow-color)}.user-status{position:absolute;bottom:0;right:0;width:.75rem;height:.75rem;border-radius:9999px;background-color:var(--cide-theme-success-color);border:2px solid var(--cide-theme-sidebar-color)}.dark-mode .nav-item:hover{background-color:#ffffff1a}.dark-mode .nav-item-active{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 30%,var(--cide-theme-dark-color))}.dark-mode .user-avatar{border-color:var(--cide-theme-dark-color);background-color:#ffffff1a}.dark-mode .user-status{border-color:var(--cide-theme-dark-color)}.dark-mode .user-menu{background-color:var(--cide-theme-dark-color);border-color:#ffffff1a}.dark-mode .user-menu a{color:#fffc}.dark-mode .user-menu a:hover{background-color:#ffffff1a}.section-header{transition:all .2s ease;border:1px solid transparent}.section-header:hover{background-color:#f8fafc!important;border-color:#e2e8f0}.section-header:focus{outline:none;box-shadow:0 0 0 2px #3b82f6;border-color:#3b82f6}.section-content{overflow:hidden;transition:all .3s ease}.section-header .tw-rotate-90{transform:rotate(90deg)}.section-content .tw-border-l{border-left-color:#d1d5db}.section-header:hover .tw-text-gray-500{color:#6b7280}.section-header:hover .tw-text-gray-800{color:#374151}\n"] }]
1911
+ }], ctorParameters: () => [], propDecorators: { onDocumentClick: [{
1912
+ type: HostListener,
1913
+ args: ['document:click', ['$event']]
1914
+ }] } });
1915
+
1916
+ /**
1917
+ * A custom route reuse strategy that allows storing and retrieving routes
1918
+ * to persist component state, especially for tabbed navigation.
1919
+ */
1920
+ class CustomRouteReuseStrategy {
1921
+ constructor() {
1922
+ this.storedRoutes = {};
1923
+ }
1924
+ // Generates a unique key for a route.
1925
+ // For routes marked with 'reuseTab', this key includes sorted query parameters
1926
+ // to ensure distinct states for tabs differing by query params.
1927
+ getPathKey(route) {
1928
+ let path = route.pathFromRoot
1929
+ .map(r => r.url.map(segment => segment.path).join('/'))
1930
+ .filter(p => p.length > 0)
1931
+ .join('/');
1932
+ // If the route is marked for tab reuse and has query parameters,
1933
+ // append them to the key in a sorted, consistent manner.
1934
+ if (route.data && route.data['reuseTab'] && route.queryParamMap.keys.length > 0) {
1935
+ const queryParams = route.queryParamMap.keys
1936
+ .sort() // Ensure consistent order of query parameters
1937
+ .map(key => `${key}=${route.queryParamMap.get(key)}`)
1938
+ .join('&');
1939
+ path += '?' + queryParams;
1940
+ }
1941
+ return path;
1942
+ }
1943
+ // Determines if this route (and its subtree) should be detached to be reused later.
1944
+ shouldDetach(route) {
1945
+ return !!(route.data && route.data['reuseTab']);
1946
+ }
1947
+ // Stores the detached route.
1948
+ store(route, handle) {
1949
+ const pathKey = this.getPathKey(route);
1950
+ if (handle && route.data && route.data['reuseTab'] && pathKey) {
1951
+ this.storedRoutes[pathKey] = handle;
1952
+ }
1953
+ }
1954
+ // Determines if this route (and its subtree) should be reattached.
1955
+ shouldAttach(route) {
1956
+ const pathKey = this.getPathKey(route);
1957
+ return !!pathKey && !!this.storedRoutes[pathKey];
1958
+ }
1959
+ // Retrieves the previously stored route.
1960
+ retrieve(route) {
1961
+ const pathKey = this.getPathKey(route);
1962
+ if (!pathKey || !this.storedRoutes[pathKey]) {
1963
+ return null;
1964
+ }
1965
+ return this.storedRoutes[pathKey];
1966
+ }
1967
+ // Determines if a route should be reused.
1968
+ shouldReuseRoute(future, curr) {
1969
+ return future.routeConfig === curr.routeConfig;
1970
+ }
1971
+ // Clears a stored route, typically when a tab is closed.
1972
+ clearStoredRoute(pathKey) {
1973
+ delete this.storedRoutes[pathKey];
1974
+ }
1975
+ }
1976
+
1977
+ /**
1978
+ * Creates the default state for a new tab.
1979
+ */
1980
+ const createDefaultComponentState = () => ({
1981
+ sideDrawer: { isOpen: false, activeComponent: null, componentState: {} },
1982
+ footer: { someData: '' },
1983
+ console: { history: [] },
1984
+ });
1985
+ class TabStateService {
1986
+ /**
1987
+ * Adds a new tab to the state.
1988
+ * @param title The title for the new tab.
1989
+ * @param id An optional unique ID. If not provided, one will be generated.
1990
+ * @returns The ID of the newly created tab.
1991
+ */
1992
+ addTab(title, id) {
1993
+ const newTabId = id || `tab_${Date.now()}_${Math.random()}`;
1994
+ const newTab = {
1995
+ id: newTabId,
1996
+ title,
1997
+ componentState: createDefaultComponentState(),
1998
+ };
1999
+ const currentTabs = this._tabsState.getValue();
2000
+ const newTabs = new Map(currentTabs).set(newTabId, newTab);
2001
+ this._tabsState.next(newTabs);
2002
+ this.setActiveTab(newTabId);
2003
+ return newTabId;
2004
+ }
2005
+ /**
2006
+ * Removes a tab from the state.
2007
+ * @param tabIdToRemove The ID of the tab to remove.
2008
+ */
2009
+ removeTab(tabIdToRemove) {
2010
+ const currentTabs = this._tabsState.getValue();
2011
+ if (!currentTabs.has(tabIdToRemove)) {
2012
+ return;
2013
+ }
2014
+ const newTabs = new Map(currentTabs);
2015
+ newTabs.delete(tabIdToRemove);
2016
+ this._tabsState.next(newTabs);
2017
+ }
2018
+ constructor() {
2019
+ // Holds the state for all open tabs, keyed by tab ID.
2020
+ this._tabsState = new BehaviorSubject(new Map());
2021
+ // Holds the ID of the currently active tab.
2022
+ this._activeTabId = new BehaviorSubject(null);
2023
+ /** An observable of all open tabs. */
2024
+ this.tabs$ = this._tabsState.pipe(map(tabsMap => Array.from(tabsMap.values())));
2025
+ /** An observable of the currently active tab's ID. */
2026
+ this.activeTabId$ = this._activeTabId.asObservable().pipe(distinctUntilChanged());
2027
+ /** An observable of the state of the currently active tab. */
2028
+ this.activeTabState$ = this.activeTabId$.pipe(map(activeId => (activeId ? this._tabsState.getValue().get(activeId) ?? null : null)),
2029
+ // Use a deep-ish comparison to prevent emissions when only the object reference changes
2030
+ distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
2031
+ /** An observable of just the component-specific state for the active tab. */
2032
+ this.activeComponentState$ = this.activeTabState$.pipe(map(activeTab => activeTab?.componentState ?? null));
2033
+ // You can initialize with default tabs if needed
2034
+ // For example:
2035
+ // this.addTab('Welcome Tab');
2036
+ }
2037
+ /**
2038
+ * Sets the currently active tab.
2039
+ * @param tabId The unique identifier of the tab to activate.
2040
+ */
2041
+ setActiveTab(tabId) {
2042
+ if (this._activeTabId.getValue() !== tabId) {
2043
+ this._activeTabId.next(tabId);
2044
+ }
2045
+ }
2046
+ /**
2047
+ * Updates the state for the currently active tab.
2048
+ * This performs a deep merge to avoid overwriting nested state.
2049
+ * @param partialState The partial state to update for the active tab.
2050
+ */
2051
+ updateActiveTabState(partialState) {
2052
+ const activeId = this._activeTabId.getValue();
2053
+ if (!activeId) {
2054
+ console.warn('Cannot update state, no active tab.');
2055
+ return;
2056
+ }
2057
+ const tabs = this._tabsState.getValue();
2058
+ const activeTabState = tabs.get(activeId);
2059
+ if (activeTabState) {
2060
+ // Use lodash merge for a deep merge
2061
+ const updatedState = merge({}, activeTabState, { componentState: partialState });
2062
+ const newTabsState = new Map(tabs);
2063
+ newTabsState.set(activeId, updatedState);
2064
+ this._tabsState.next(newTabsState);
2065
+ }
2066
+ }
2067
+ /**
2068
+ * Gets an observable for a specific tab's state.
2069
+ * @param tabId The ID of the tab to observe.
2070
+ */
2071
+ getTabState(tabId) {
2072
+ return this._tabsState.pipe(map(tabs => tabs.get(tabId)));
2073
+ }
2074
+ /**
2075
+ * Determines the ID of the next tab to activate when a tab is closed.
2076
+ * @param idToRemove The ID of the tab being removed.
2077
+ * @returns The ID of the next tab to activate, or null if no tabs are left.
2078
+ */
2079
+ getNextActiveTabId(idToRemove) {
2080
+ const tabsMap = this._tabsState.getValue();
2081
+ if (tabsMap.size <= 1) {
2082
+ return null;
2083
+ }
2084
+ const tabIds = Array.from(tabsMap.keys());
2085
+ const removedIndex = tabIds.indexOf(idToRemove);
2086
+ // If it's the last tab in the list, activate the one before it. Otherwise, activate the next one.
2087
+ const nextIndex = removedIndex === tabIds.length - 1 ? removedIndex - 1 : removedIndex + 1;
2088
+ return tabIds[nextIndex];
2089
+ }
2090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: TabStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2091
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: TabStateService, providedIn: 'root' }); }
2092
+ }
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: TabStateService, decorators: [{
2094
+ type: Injectable,
2095
+ args: [{
2096
+ providedIn: 'root',
2097
+ }]
2098
+ }], ctorParameters: () => [] });
2099
+
2100
+ class CideLytRequestService {
2101
+ constructor() {
2102
+ this.requestVisible = false;
2103
+ // Modern Angular v20+ pattern: Use Signals instead of BehaviorSubject
2104
+ this.tabsSignal = signal([]);
2105
+ this.activeTabIdSignal = signal(null);
2106
+ // Computed signals for derived state and public readonly access
2107
+ this.tabs = computed(() => this.tabsSignal());
2108
+ this.activeTabId = computed(() => this.activeTabIdSignal());
2109
+ this.activeTab = computed(() => this.tabsSignal().find(tab => tab.active));
2110
+ // Use inject() for all dependencies
2111
+ this.router = inject(Router);
2112
+ this.routeReuseStrategy = inject(RouteReuseStrategy);
2113
+ this.tabStateService = inject(TabStateService);
2114
+ this.sidedrawerService = inject(CideLytSidedrawerService);
2115
+ this.sharedService = inject(CideLytSharedService);
2116
+ // Initialize router
2117
+ this.router = inject(Router);
2118
+ this.router.routeReuseStrategy = new CustomRouteReuseStrategy();
2119
+ // Register tab management callback with shared service to avoid circular dependency
2120
+ this.sharedService.registerTabManagement(this.handleRouteBasedTabManagement.bind(this));
2121
+ // Register request visibility callback
2122
+ this.sharedService.registerRequestVisibility(this.handleRequestVisibility.bind(this));
2123
+ }
2124
+ /**
2125
+ * Handle request visibility changes from shared service
2126
+ */
2127
+ handleRequestVisibility(show) {
2128
+ if (show) {
2129
+ this.showRequest();
2130
+ }
2131
+ else {
2132
+ this.hideRequest();
2133
+ }
2134
+ }
2135
+ /**
2136
+ * Handle sidebar sync when tab becomes active
2137
+ */
2138
+ handleSidebarSync(tabInfo) {
2139
+ // The sidebar sync will be handled automatically by the shared service
2140
+ // when page data is loaded, so we don't need additional logic here
2141
+ console.log('🔗 REQUEST SERVICE: Tab activated, sidebar sync handled by shared service:', tabInfo.title);
2142
+ }
2143
+ /**
2144
+ * Handle route-based tab management - called by shared service
2145
+ * This method checks for existing tabs and creates/activates as needed
2146
+ */
2147
+ handleRouteBasedTabManagement(currentRoutePath, queryParams, layout, pageData, pageCode) {
2148
+ console.log('handleRouteBasedTabManagement', currentRoutePath, queryParams, layout, pageData, pageCode);
2149
+ const currentTabs = this.tabsSignal();
2150
+ const tabAlreadyExists = currentTabs.find((t) => {
2151
+ const tRoutePath = t.route.startsWith('/') ? t.route : '/' + t.route;
2152
+ const tParamsMatch = JSON.stringify(t.params || {}) === JSON.stringify(queryParams || {});
2153
+ return tRoutePath === currentRoutePath && tParamsMatch;
2154
+ });
2155
+ console.log('tabAlreadyExists', tabAlreadyExists);
2156
+ if (!tabAlreadyExists) {
2157
+ const title = pageData.data?.page?.sypg_title || pageCode.toString() || 'Untitled Tab';
2158
+ console.log(`🆕 Adding new tab: ${title}`);
2159
+ this.addTab(title, currentRoutePath, queryParams, layout);
2160
+ }
2161
+ else if (tabAlreadyExists && !tabAlreadyExists.active) {
2162
+ console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);
2163
+ this.activateTab(tabAlreadyExists.id);
2164
+ }
2165
+ else if (tabAlreadyExists && tabAlreadyExists.active) {
2166
+ console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);
2167
+ this.activateTab(tabAlreadyExists.id);
2168
+ }
2169
+ }
2170
+ addTab(title, route, params, layout) {
2171
+ console.log('addTab', title, route, params, layout);
2172
+ const id = this.generateId();
2173
+ const currentTabs = this.tabsSignal();
2174
+ console.log('currentTabs', currentTabs, route);
2175
+ // Check if a tab with the same route and params already exists
2176
+ const existingTab = currentTabs.find((tab) => {
2177
+ const paramsMatch = JSON.stringify(tab.params || {}) === JSON.stringify(params || {});
2178
+ return tab.route === route && paramsMatch;
2179
+ });
2180
+ console.log('existingTab', existingTab);
2181
+ if (existingTab) {
2182
+ this.activateTab(existingTab.id);
2183
+ return existingTab.id;
2184
+ }
2185
+ // Create new tab
2186
+ const newTab = {
2187
+ id,
2188
+ title,
2189
+ route,
2190
+ params,
2191
+ active: true,
2192
+ layout,
2193
+ sytm_page_id_sypg: '',
2194
+ themeId: ''
2195
+ };
2196
+ // Deactivate all other tabs
2197
+ currentTabs.forEach((tab) => tab.active = false);
2198
+ console.log('currentTabs after deactivate', currentTabs, 'activateTab', id);
2199
+ // Add new tab
2200
+ this.tabsSignal.set([...currentTabs, newTab]);
2201
+ this.activeTabIdSignal.set(id);
2202
+ // Sync with TabStateService
2203
+ this.tabStateService.addTab(title, id);
2204
+ // Request visibility is now controlled by layout configuration in setPageData
2205
+ // No need to automatically show request wrapper here
2206
+ // Navigate to the new route
2207
+ if (params) {
2208
+ this.router.navigate([route], { queryParams: params });
2209
+ }
2210
+ else {
2211
+ this.router.navigate([route]);
2212
+ }
2213
+ return id;
2214
+ }
2215
+ activateTab(tabId) {
2216
+ console.log('🔍 REQUEST SERVICE: Activating tab:', tabId);
2217
+ const tabs = this.tabsSignal();
2218
+ const tabToActivate = tabs.find(tab => tab.id === tabId);
2219
+ if (!tabToActivate) {
2220
+ console.warn('⚠️ Tab not found:', tabId);
2221
+ return;
2222
+ }
2223
+ // Update tabs: deactivate all, then activate the target
2224
+ const updatedTabs = tabs.map(tab => ({
2225
+ ...tab,
2226
+ active: tab.id === tabId
2227
+ }));
2228
+ this.tabsSignal.set(updatedTabs);
2229
+ this.activeTabIdSignal.set(tabId);
2230
+ console.log('✅ REQUEST SERVICE: Tab activated:', tabToActivate.title);
2231
+ // Navigate to the tab's route
2232
+ this.router.navigate([tabToActivate.route], {
2233
+ queryParams: tabToActivate.params || {},
2234
+ replaceUrl: false
2235
+ });
2236
+ // Trigger sidebar sync for the activated tab by calling shared service
2237
+ // The shared service will handle the sidebar sync when the route loads
2238
+ console.log('🔗 REQUEST SERVICE: Sidebar sync will be handled by route change');
2239
+ }
2240
+ closeTab(id) {
2241
+ const currentTabs = this.tabsSignal();
2242
+ const tabIndex = currentTabs.findIndex((tab) => tab.id === id);
2243
+ if (tabIndex === -1)
2244
+ return;
2245
+ const tabToClose = currentTabs[tabIndex];
2246
+ const wasActive = tabToClose.active;
2247
+ // Sync with TabStateService by removing the tab state
2248
+ this.tabStateService.removeTab(id);
2249
+ // Clear stored route from strategy
2250
+ if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
2251
+ let pathKey = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
2252
+ if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {
2253
+ const queryParamsString = Object.keys(tabToClose.params)
2254
+ .sort()
2255
+ .map(key => `${key}=${tabToClose.params[key]}`)
2256
+ .join('&');
2257
+ pathKey += '?' + queryParamsString;
2258
+ }
2259
+ this.routeReuseStrategy.clearStoredRoute(pathKey);
2260
+ }
2261
+ // Remove the tab from this service's list
2262
+ const newTabs = currentTabs.filter((tab) => tab.id !== id);
2263
+ // If we're closing the active tab, activate the next available tab
2264
+ if (wasActive && newTabs.length > 0) {
2265
+ const newActiveIndex = Math.max(0, Math.min(tabIndex, newTabs.length - 1));
2266
+ const newActiveTab = newTabs[newActiveIndex];
2267
+ // Update sidedrawer for the new active tab
2268
+ this.sidedrawerService.updateDrawerItems(newActiveTab.layout);
2269
+ newTabs[newActiveIndex].active = true;
2270
+ this.activeTabIdSignal.set(newActiveTab.id);
2271
+ this.tabStateService.setActiveTab(newActiveTab.id);
2272
+ // Navigate to the new active tab's route
2273
+ if (newActiveTab.params) {
2274
+ this.router.navigate([newActiveTab.route], { queryParams: newActiveTab.params });
2275
+ }
2276
+ else {
2277
+ this.router.navigate([newActiveTab.route]);
2278
+ }
2279
+ }
2280
+ else if (newTabs.length === 0) {
2281
+ this.activeTabIdSignal.set(null);
2282
+ this.tabStateService.setActiveTab(null);
2283
+ // Clear sidedrawer as no tabs are open
2284
+ this.sidedrawerService.updateDrawerItems(undefined);
2285
+ }
2286
+ this.tabsSignal.set(newTabs);
2287
+ // Request wrapper visibility is now controlled by layout configuration
2288
+ // The wrapper will be hidden/shown based on sytm_layout_request.status in setPageData
2289
+ }
2290
+ // Hide Request
2291
+ hideRequest() {
2292
+ console.log('🚫 REQUEST SERVICE - Hiding request wrapper');
2293
+ this.requestVisible = false;
2294
+ document.querySelector(`#cide-lyt-request-wrapper`)?.classList.add('cide-lyt-request-wrapper-hide');
2295
+ document.querySelector(`body`)?.classList.remove('cide-lyt-request-exist');
2296
+ }
2297
+ // Show Request
2298
+ showRequest() {
2299
+ console.log('✅ REQUEST SERVICE - Showing request wrapper');
2300
+ this.requestVisible = true;
2301
+ document.querySelector(`#cide-lyt-request-wrapper`)?.classList.remove('cide-lyt-request-wrapper-hide');
2302
+ document.querySelector(`body`)?.classList.add('cide-lyt-request-exist');
2303
+ }
2304
+ generateId() {
2305
+ return 'tab-' + Math.random().toString(36).substr(2, 9);
2306
+ }
2307
+ updateTabScrollPosition(tabId, scrollTop, scrollLeft) {
2308
+ const currentTabs = this.tabsSignal();
2309
+ const tabIndex = currentTabs.findIndex((t) => t.id === tabId);
2310
+ if (tabIndex !== -1) {
2311
+ const tabToUpdate = currentTabs[tabIndex];
2312
+ tabToUpdate.scrollTop = scrollTop;
2313
+ tabToUpdate.scrollLeft = scrollLeft;
2314
+ // Create a new array reference to trigger change detection
2315
+ this.tabsSignal.set([...currentTabs]);
2316
+ }
2317
+ }
2318
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2319
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytRequestService, providedIn: 'root' }); }
2320
+ }
2321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytRequestService, decorators: [{
2322
+ type: Injectable,
2323
+ args: [{
2324
+ providedIn: 'root'
2325
+ }]
2326
+ }], ctorParameters: () => [] });
2327
+
2328
+ // Type guard for setState/getState
2329
+ function hasStateMethods(instance) {
2330
+ return !!instance && typeof instance.getState === 'function' && typeof instance.setState === 'function';
2331
+ }
2332
+ // Type guard for NotesComponentState
2333
+ function isNotesComponentState(state) {
2334
+ return !!state && typeof state === 'object' &&
2335
+ 'newNoteModel' in state &&
2336
+ 'isFormVisible' in state &&
2337
+ 'scrollTop' in state;
2338
+ }
2339
+ class CideLytSidedrawerWrapperComponent {
2340
+ // Modern Angular v20 pattern: Use Signals directly
2341
+ get drawerItems() { return this.sidedrawerService.drawerItems; }
2342
+ get notesVisible() { return this.sidedrawerService.notesVisible; }
2343
+ // Computed signal to determine if sidedrawer should be visible
2344
+ get shouldShowSidedrawer() {
2345
+ return computed(() => {
2346
+ const items = this.drawerItems();
2347
+ return items && items.length > 0;
2348
+ });
2349
+ }
2350
+ constructor() {
2351
+ this.sidedrawerSetupData = {
2352
+ cide_lyt_sidedrawer_width: 0
2353
+ };
2354
+ this.isExpanded = false; // New property to track expansion state
2355
+ this.currentComponentRef = null;
2356
+ this.componentMap = {}; // Map configFor to component
2357
+ this.currentTabId = null;
2358
+ this.currentActiveComponent = null;
2359
+ this.sidedrawerService = inject(CideLytSidedrawerService);
2360
+ this.requestService = inject(CideLytRequestService);
2361
+ this.tabStateService = inject(TabStateService);
2362
+ // Modern Angular v20 pattern: Use Signals directly with effect
2363
+ effect(() => {
2364
+ const configFor = this.sidedrawerService.activeComponent();
2365
+ this.currentActiveComponent = configFor;
2366
+ this.loadComponent(configFor);
2367
+ }, { allowSignalWrites: true });
2368
+ // Effect to track active tab changes
2369
+ effect(() => {
2370
+ const activeTabId = this.requestService.activeTabId();
2371
+ console.log('🔍 SIDEDRAWER - Active tab changed:', activeTabId);
2372
+ this.currentTabId = activeTabId;
2373
+ if (activeTabId) {
2374
+ console.log('🔍 SIDEDRAWER - Loading tab state for:', activeTabId);
2375
+ this.tabStateService.getTabState(activeTabId).pipe(take$1(1)).subscribe(tabState => {
2376
+ console.log('🔍 SIDEDRAWER - Tab state loaded:', tabState);
2377
+ const sideDrawer = tabState?.componentState.sideDrawer;
2378
+ if (sideDrawer) {
2379
+ console.log('🔍 SIDEDRAWER - Restoring drawer state:', sideDrawer);
2380
+ // Restore activeComponent
2381
+ this.sidedrawerService.setActiveComponent(sideDrawer.activeComponent);
2382
+ // Modern ES2022+ pattern: Use Promise-based delay with microtask
2383
+ Promise.resolve().then(() => {
2384
+ if (sideDrawer.activeComponent && this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance)) {
2385
+ const compState = sideDrawer.componentState?.[sideDrawer.activeComponent];
2386
+ // Add type guards for each component as needed
2387
+ if (sideDrawer.activeComponent === 'drowar_notes' && isNotesComponentState(compState)) {
2388
+ this.currentComponentRef.instance.setState(compState);
2389
+ }
2390
+ }
2391
+ });
2392
+ }
2393
+ else {
2394
+ console.log('🔍 SIDEDRAWER - No drawer state found, clearing active component');
2395
+ this.sidedrawerService.setActiveComponent(null);
2396
+ }
2397
+ });
2398
+ }
2399
+ else {
2400
+ console.log('🔍 SIDEDRAWER - No active tab, clearing drawer state');
2401
+ this.sidedrawerService.setActiveComponent(null);
2402
+ }
2403
+ }, { allowSignalWrites: true });
2404
+ // collecte the width of the sidebar by using the style property
2405
+ const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));
2406
+ this.sidedrawerSetupData.cide_lyt_sidedrawer_width = (cide_lyt_sidedrawer_wrapper_width);
2407
+ }
2408
+ ngOnInit() {
2409
+ // Initialize the component map (You'd likely populate this from a config or service)
2410
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-ds12wZbh.mjs').then(m => m.CideLytSidedrawerNotesComponent);
2411
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-xd8IG3WP.mjs').then(m => m.CideLytDrawerThemeComponent);
2412
+ }
2413
+ async loadComponent(configFor) {
2414
+ console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
2415
+ // Always clear the container and destroy the previous component
2416
+ this.notesContainer?.clear();
2417
+ if (this.currentComponentRef) {
2418
+ this.currentComponentRef.destroy();
2419
+ this.currentComponentRef = null;
2420
+ }
2421
+ if (!configFor) {
2422
+ console.log('🔍 SIDEDRAWER - No component to load, collapsing');
2423
+ this.isExpanded = false;
2424
+ this.saveSidedrawerState(null);
2425
+ return;
2426
+ }
2427
+ console.log('🔍 SIDEDRAWER - Expanding and loading:', configFor);
2428
+ this.isExpanded = true;
2429
+ const componentLoader = this.componentMap[configFor];
2430
+ console.log('🔍 SIDEDRAWER - Component loader found:', !!componentLoader);
2431
+ if (componentLoader) {
2432
+ try {
2433
+ console.log('🔍 SIDEDRAWER - Importing component for:', configFor);
2434
+ const componentType = await componentLoader();
2435
+ console.log('🔍 SIDEDRAWER - Component imported successfully');
2436
+ this.currentComponentRef = this.notesContainer.createComponent(componentType);
2437
+ console.log('🔍 SIDEDRAWER - Component created successfully');
2438
+ // Add the cide-lyt-sidedrawer-wrapper-child class to the created component
2439
+ if (this.currentComponentRef.location.nativeElement) {
2440
+ this.currentComponentRef.location.nativeElement.classList.add('cide-lyt-sidedrawer-wrapper-child');
2441
+ }
2442
+ this.setComponentContext(configFor);
2443
+ // Optionally restore state here if you have it
2444
+ this.saveSidedrawerState(configFor);
2445
+ console.log('🔍 SIDEDRAWER - Component setup completed');
2446
+ }
2447
+ catch (error) {
2448
+ console.error(`🚨 SIDEDRAWER - Error loading component for ${configFor}:`, error);
2449
+ this.isExpanded = false;
2450
+ }
2451
+ }
2452
+ else {
2453
+ console.warn(`⚠️ SIDEDRAWER - No component mapping found for configFor: ${configFor}`);
2454
+ console.log('🔍 SIDEDRAWER - Available mappings:', Object.keys(this.componentMap));
2455
+ this.isExpanded = false;
2456
+ }
2457
+ }
2458
+ clearComponent(destroy = true) {
2459
+ this.saveSidedrawerState();
2460
+ this.notesContainer?.clear();
2461
+ if (this.currentComponentRef && destroy) {
2462
+ this.currentComponentRef.destroy();
2463
+ }
2464
+ this.currentComponentRef = null;
2465
+ }
2466
+ saveSidedrawerState(configForOverride) {
2467
+ console.log('🔍 SIDEDRAWER - Saving state, current tab:', this.currentTabId);
2468
+ if (!this.currentTabId) {
2469
+ console.log('⚠️ SIDEDRAWER - No current tab, skipping state save');
2470
+ return;
2471
+ }
2472
+ const activeComponent = configForOverride !== undefined ? configForOverride : this.currentActiveComponent;
2473
+ console.log('🔍 SIDEDRAWER - Active component for save:', activeComponent);
2474
+ let componentState = undefined;
2475
+ if (this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance) && activeComponent) {
2476
+ const state = this.currentComponentRef.instance.getState();
2477
+ // Add type guards for each component as needed
2478
+ if (activeComponent === 'drowar_notes' && isNotesComponentState(state)) {
2479
+ componentState = { [activeComponent]: state };
2480
+ }
2481
+ // Example for other components:
2482
+ // else if (activeComponent === 'other_component' && isOtherComponentState(state)) {
2483
+ // componentState = { [activeComponent]: state };
2484
+ // }
2485
+ }
2486
+ console.log('🔍 SIDEDRAWER - Updating tab state with:', {
2487
+ isOpen: !!activeComponent,
2488
+ activeComponent,
2489
+ componentState
2490
+ });
2491
+ this.tabStateService.updateActiveTabState({
2492
+ sideDrawer: {
2493
+ isOpen: !!activeComponent,
2494
+ activeComponent,
2495
+ componentState
2496
+ }
2497
+ });
2498
+ }
2499
+ setComponentContext(configFor) {
2500
+ // You can adjust this logic to pass different context data based on configFor if needed.
2501
+ const context = this.getNotesContext(configFor); // Using your existing method for now.
2502
+ if (this.currentComponentRef && context && this.currentComponentRef.setInput) {
2503
+ // Pass context data
2504
+ this.currentComponentRef.setInput('context', context);
2505
+ }
2506
+ }
2507
+ // This function needs to be enhanced to handle contexts for different components
2508
+ getNotesContext(configFor) {
2509
+ switch (configFor) {
2510
+ case 'drowar_notes': {
2511
+ // Example for notes component context
2512
+ const activeTab = this.requestService.activeTab(); // Use the computed signal for active tab
2513
+ return {
2514
+ pageId: activeTab?.sytm_page_id_sypg,
2515
+ themeId: activeTab?.themeId,
2516
+ // Add other properties as needed for notes
2517
+ };
2518
+ }
2519
+ case 'drawer_theme': {
2520
+ // You can add theme context here if needed
2521
+ return {};
2522
+ }
2523
+ default:
2524
+ return null; // Or a default context if appropriate
2525
+ }
2526
+ }
2527
+ onItemClick(item) {
2528
+ const activeTabId = this.requestService.activeTabId();
2529
+ console.log('🔍 SIDEDRAWER - Item clicked:', item);
2530
+ console.log('🔍 SIDEDRAWER - Active tab ID:', activeTabId);
2531
+ // Modern Angular v20 pattern: Use Signals directly
2532
+ const activeComponent = this.sidedrawerService.activeComponent();
2533
+ console.log('🔍 SIDEDRAWER - Current active component:', activeComponent);
2534
+ console.log('🔍 SIDEDRAWER - Item configFor:', item.configFor);
2535
+ if (activeComponent === item?.configFor) {
2536
+ console.log('🔄 SIDEDRAWER - Same component clicked, toggling off');
2537
+ const cide_lyt_sidedrawer_wrapper = document.querySelector('#cide-lyt-sidedrawer-wrapper');
2538
+ const cide_lyt_outlet_wrapper = document.querySelector('#cide-lyt-outlet-wrapper');
2539
+ if (cide_lyt_sidedrawer_wrapper instanceof HTMLElement && cide_lyt_outlet_wrapper instanceof HTMLElement) {
2540
+ const width_of_prev = parseInt(cide_lyt_outlet_wrapper.style.width);
2541
+ const width_of_next = parseInt(cide_lyt_sidedrawer_wrapper.style.width);
2542
+ const width_of_next_default = 32;
2543
+ const width_of_prev_default = width_of_prev + (width_of_next - width_of_next_default);
2544
+ cide_lyt_outlet_wrapper.style.width = `${width_of_prev_default}px`;
2545
+ cide_lyt_sidedrawer_wrapper.style.width = `${width_of_next_default}px`; // Fix: Cast to HTMLElement to access style property
2546
+ }
2547
+ this.sidedrawerService.setActiveComponent(null); // Destroy if same
2548
+ this.saveSidedrawerState(null);
2549
+ }
2550
+ else {
2551
+ console.log('✅ SIDEDRAWER - New component clicked, setting active:', item.configFor);
2552
+ this.sidedrawerService.setActiveComponent(item.configFor); // Set new
2553
+ this.saveSidedrawerState(item.configFor);
2554
+ }
2555
+ }
2556
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidedrawerWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2557
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytSidedrawerWrapperComponent, isStandalone: true, selector: "cide-lyt-sidedrawer-wrapper", viewQueries: [{ propertyName: "notesContainer", first: true, predicate: ["notesContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<nav *ngIf=\"shouldShowSidedrawer()\" \r\n [ngClass]=\"{'expanded tw-min-w-[var(--cide-lyt-sidedrawer-wrapper-width-expanded-min)]': isExpanded, 'tw-w-[var(--cide-lyt-sidedrawer-wrapper-width)]': !isExpanded}\"\r\n id=\"cide-lyt-sidedrawer-wrapper\" class=\"tw-flex tw-relative tw-flex-col tw-items-center tw-justify-between tw-h-full tw-bg-white tw-shadow-lg tw-border-l tw-border-gray-200\">\r\n <!-- Resizer Divider -->\r\n <div parentElementSelector=\"#cide-lyt-outlet-sidedrawer-wrapper\"\r\n [minNextSize]=\"sidedrawerSetupData.cide_lyt_sidedrawer_width\" prevElementSelector=\"#cide-lyt-outlet-wrapper\"\r\n nextElementSelector=\"#cide-lyt-sidedrawer-wrapper\" cideEleResizer direction=\"horizontal\" to=\"right-to-left\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <!-- Main Icon Area -->\r\n <div class=\"tw-flex tw-justify-between tw-h-full tw-w-full\">\r\n <div class=\"tw-w-8 tw-h-full tw-border-r tw-border-gray-200\">\r\n <div class=\"sidedrawer-icon tw-flex tw-flex-col tw-items-center tw-gap-2\">\r\n <ng-container *ngIf=\"drawerItems() as items; else loading\">\r\n <div *ngFor=\"let item of items\" [title]=\"item.title\">\r\n <button (click)=\"onItemClick(item)\"\r\n class=\"tw-p-0 tw-rounded-md hover:tw-bg-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\"\r\n [ngClass]=\"{'tw-bg-blue-100 tw-text-blue-700': sidedrawerService.activeComponent() === item.configFor}\">\r\n <cide-ele-icon [cideEleTooltip]=\"item.title\" tooltipPlacement=\"left\" width=\"1.3rem\" height=\"1.5rem\" type=\"box\">{{item.icon}}</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <cide-ele-skeleton-loader [width]=\"'2rem'\" [height]=\"'2rem'\" [count]=\"3\"\r\n [circle]=\"true\"></cide-ele-skeleton-loader>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex-1 cide-lyt-sidedrawer-wrapper-child-holder\">\r\n <div #notesContainer class=\"tw-h-full\">\r\n </div>\r\n </div>\r\n </div>\r\n</nav>", styles: [".cide-lyt-sidebar{display:flex;box-shadow:0 4px 12px var(--sidebar-shadow-color);overflow:hidden;background-color:var(--cide-theme-sidebar-color);--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);--sidebar-shadow-color: var(--cide-theme-shadow-color, rgba(0, 0, 0, .05));transition:width .3s cubic-bezier(.4,0,.2,1);max-height:100%;isolation:isolate;will-change:width;position:relative}cide-ele-icon{color:var(--cide-theme-icon-color, var(--tw-gray-500));transition:all .2s ease}cide-ele-icon:hover{color:var(--cide-theme-icon-hover-color, var(--tw-gray-700));transform:scale(1.1)}.dark-mode .cide-lyt-sidebar{background-color:var(--cide-theme-dark-color)}.dark-mode .cide-lyt-devider-track{background-color:color-mix(in srgb,var(--cide-theme-dark-color) 70%,var(--cide-theme-black, #000));border-left-color:var(--cide-theme-dark-color)}.dark-mode .cide-lyt-devider-track:hover{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 20%,var(--cide-theme-dark-color))}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.tw-text-gray-500{color:var(--cide-theme-icon-color)}.hover\\:tw-text-gray-700:hover{color:var(--cide-theme-icon-hover-color)}.tw-text-gray-700{color:var(--cide-theme-text-color)}.tw-text-red-500,.tw-text-red-600,.tw-text-red-700{color:var(--cide-theme-error-color)}.tw-bg-gray-200{background-color:var(--cide-theme-border-color)}.hover\\:tw-bg-gray-100:hover{background-color:var(--cide-theme-hover-bg-color)}.tw-bg-white{background-color:var(--cide-theme-sidebar-color)}.tw-bg-green-500{background-color:var(--cide-theme-success-color)}.tw-border-gray-100,.tw-divide-gray-100{border-color:var(--cide-theme-border-color)}.tw-shadow-lg{box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color)}.tw-shadow-sm,.hover\\:tw-shadow:hover{box-shadow:0 1px 2px 0 var(--cide-theme-shadow-color)}.sidedrawer-icon{margin:.25rem 0}.cide-lyt-sidedrawer-wrapper-child-holder{display:grid;height:100%;width:100%;overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "directive", type: CideEleResizerDirective, selector: "[cideEleResizer]", inputs: ["direction", "to", "prevElementSelector", "nextElementSelector", "parentElementSelector", "minPrevSize", "minNextSize", "usePercentage"], outputs: ["resizeStart", "resizing", "resizeEnd"] }, { kind: "component", type: CideEleSkeletonLoaderComponent, selector: "cide-ele-skeleton-loader", inputs: ["width", "height", "borderRadius", "count", "circle", "animation"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TooltipDirective, selector: "[cideEleTooltip]", inputs: ["cideEleTooltip", "tooltipColor", "tooltipBg", "tooltipPlacement", "tooltipType", "tooltipDelay", "tooltipDir", "tooltipShowArrow", "tooltipMultiline", "tooltipMaxWidth", "tooltipInteractive", "tooltipClass"] }] }); }
2558
+ }
2559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytSidedrawerWrapperComponent, decorators: [{
2560
+ type: Component,
2561
+ args: [{ selector: 'cide-lyt-sidedrawer-wrapper', standalone: true, imports: [
2562
+ NgClass,
2563
+ CideIconComponent,
2564
+ CideEleResizerDirective,
2565
+ CideEleSkeletonLoaderComponent,
2566
+ NgFor,
2567
+ NgIf,
2568
+ TooltipDirective
2569
+ ], template: "<nav *ngIf=\"shouldShowSidedrawer()\" \r\n [ngClass]=\"{'expanded tw-min-w-[var(--cide-lyt-sidedrawer-wrapper-width-expanded-min)]': isExpanded, 'tw-w-[var(--cide-lyt-sidedrawer-wrapper-width)]': !isExpanded}\"\r\n id=\"cide-lyt-sidedrawer-wrapper\" class=\"tw-flex tw-relative tw-flex-col tw-items-center tw-justify-between tw-h-full tw-bg-white tw-shadow-lg tw-border-l tw-border-gray-200\">\r\n <!-- Resizer Divider -->\r\n <div parentElementSelector=\"#cide-lyt-outlet-sidedrawer-wrapper\"\r\n [minNextSize]=\"sidedrawerSetupData.cide_lyt_sidedrawer_width\" prevElementSelector=\"#cide-lyt-outlet-wrapper\"\r\n nextElementSelector=\"#cide-lyt-sidedrawer-wrapper\" cideEleResizer direction=\"horizontal\" to=\"right-to-left\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <!-- Main Icon Area -->\r\n <div class=\"tw-flex tw-justify-between tw-h-full tw-w-full\">\r\n <div class=\"tw-w-8 tw-h-full tw-border-r tw-border-gray-200\">\r\n <div class=\"sidedrawer-icon tw-flex tw-flex-col tw-items-center tw-gap-2\">\r\n <ng-container *ngIf=\"drawerItems() as items; else loading\">\r\n <div *ngFor=\"let item of items\" [title]=\"item.title\">\r\n <button (click)=\"onItemClick(item)\"\r\n class=\"tw-p-0 tw-rounded-md hover:tw-bg-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\"\r\n [ngClass]=\"{'tw-bg-blue-100 tw-text-blue-700': sidedrawerService.activeComponent() === item.configFor}\">\r\n <cide-ele-icon [cideEleTooltip]=\"item.title\" tooltipPlacement=\"left\" width=\"1.3rem\" height=\"1.5rem\" type=\"box\">{{item.icon}}</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <cide-ele-skeleton-loader [width]=\"'2rem'\" [height]=\"'2rem'\" [count]=\"3\"\r\n [circle]=\"true\"></cide-ele-skeleton-loader>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex-1 cide-lyt-sidedrawer-wrapper-child-holder\">\r\n <div #notesContainer class=\"tw-h-full\">\r\n </div>\r\n </div>\r\n </div>\r\n</nav>", styles: [".cide-lyt-sidebar{display:flex;box-shadow:0 4px 12px var(--sidebar-shadow-color);overflow:hidden;background-color:var(--cide-theme-sidebar-color);--sidebar-tooltip-bg: var(--cide-theme-dark-color);--sidebar-tooltip-color: var(--cide-theme-light-color);--sidebar-shadow-color: var(--cide-theme-shadow-color, rgba(0, 0, 0, .05));transition:width .3s cubic-bezier(.4,0,.2,1);max-height:100%;isolation:isolate;will-change:width;position:relative}cide-ele-icon{color:var(--cide-theme-icon-color, var(--tw-gray-500));transition:all .2s ease}cide-ele-icon:hover{color:var(--cide-theme-icon-hover-color, var(--tw-gray-700));transform:scale(1.1)}.dark-mode .cide-lyt-sidebar{background-color:var(--cide-theme-dark-color)}.dark-mode .cide-lyt-devider-track{background-color:color-mix(in srgb,var(--cide-theme-dark-color) 70%,var(--cide-theme-black, #000));border-left-color:var(--cide-theme-dark-color)}.dark-mode .cide-lyt-devider-track:hover{background-color:color-mix(in srgb,var(--cide-theme-color-brand-primary) 20%,var(--cide-theme-dark-color))}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.tw-text-gray-500{color:var(--cide-theme-icon-color)}.hover\\:tw-text-gray-700:hover{color:var(--cide-theme-icon-hover-color)}.tw-text-gray-700{color:var(--cide-theme-text-color)}.tw-text-red-500,.tw-text-red-600,.tw-text-red-700{color:var(--cide-theme-error-color)}.tw-bg-gray-200{background-color:var(--cide-theme-border-color)}.hover\\:tw-bg-gray-100:hover{background-color:var(--cide-theme-hover-bg-color)}.tw-bg-white{background-color:var(--cide-theme-sidebar-color)}.tw-bg-green-500{background-color:var(--cide-theme-success-color)}.tw-border-gray-100,.tw-divide-gray-100{border-color:var(--cide-theme-border-color)}.tw-shadow-lg{box-shadow:0 10px 15px -3px var(--cide-theme-shadow-color),0 4px 6px -2px var(--cide-theme-shadow-color)}.tw-shadow-sm,.hover\\:tw-shadow:hover{box-shadow:0 1px 2px 0 var(--cide-theme-shadow-color)}.sidedrawer-icon{margin:.25rem 0}.cide-lyt-sidedrawer-wrapper-child-holder{display:grid;height:100%;width:100%;overflow:auto}\n"] }]
2570
+ }], ctorParameters: () => [], propDecorators: { notesContainer: [{
2571
+ type: ViewChild,
2572
+ args: ['notesContainer', { read: ViewContainerRef }]
2573
+ }] } });
2574
+
2575
+ class CideLytFooterWrapperComponent {
2576
+ constructor() {
2577
+ this.footerSetupData = {
2578
+ cide_lyt_footer_height: 0
2579
+ };
2580
+ // collecte the width of the sidebar by using the style property
2581
+ const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));
2582
+ this.footerSetupData.cide_lyt_footer_height = (cide_lyt_sidedrawer_wrapper_width);
2583
+ }
2584
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFooterWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2585
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytFooterWrapperComponent, isStandalone: true, selector: "cide-lyt-footer-wrapper", ngImport: i0, template: "<div\r\n class=\"cide-footer tw-w-full tw-justify-between tw-flex tw-h-5 tw-select-none tw-px-1\">\r\n <!-- Resizer -->\r\n <div parentElementSelector=\"#cide-lyt-layout-wrapper\" prevElementSelector=\"#cide-lyt-sidebar-page-wrapper\"\r\n nextElementSelector=\"#cide-lyt-footer-console-wrapper\" [minNextSize]=\"footerSetupData.cide_lyt_footer_height\" cideEleResizer direction=\"vertical\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <div></div>\r\n <div>\r\n <cide-ele-icon size=\"3xs\" class=\"tw-mt-0.5\" type=\"none\">contact_support</cide-ele-icon>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "directive", type: CideEleResizerDirective, selector: "[cideEleResizer]", inputs: ["direction", "to", "prevElementSelector", "nextElementSelector", "parentElementSelector", "minPrevSize", "minNextSize", "usePercentage"], outputs: ["resizeStart", "resizing", "resizeEnd"] }] }); }
2586
+ }
2587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytFooterWrapperComponent, decorators: [{
2588
+ type: Component,
2589
+ args: [{ selector: 'cide-lyt-footer-wrapper', standalone: true, imports: [CideIconComponent, CideEleResizerDirective], template: "<div\r\n class=\"cide-footer tw-w-full tw-justify-between tw-flex tw-h-5 tw-select-none tw-px-1\">\r\n <!-- Resizer -->\r\n <div parentElementSelector=\"#cide-lyt-layout-wrapper\" prevElementSelector=\"#cide-lyt-sidebar-page-wrapper\"\r\n nextElementSelector=\"#cide-lyt-footer-console-wrapper\" [minNextSize]=\"footerSetupData.cide_lyt_footer_height\" cideEleResizer direction=\"vertical\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <div></div>\r\n <div>\r\n <cide-ele-icon size=\"3xs\" class=\"tw-mt-0.5\" type=\"none\">contact_support</cide-ele-icon>\r\n </div>\r\n</div>" }]
2590
+ }], ctorParameters: () => [] });
2591
+
2592
+ class CideLytConsoleWrapperComponent {
2593
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytConsoleWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2594
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytConsoleWrapperComponent, isStandalone: true, selector: "cide-lyt-console-wrapper", ngImport: i0, template: "<div id=\"cide-lyt-console-wrapper\" class=\"cide-lyt-console tw-w-full tw-absolute tw-items-center tw-bg-gray-50 tw-h-0 tw-border-b-gray-200 tw-border-solid tw-border-t tw-select-none tw-z-[100] tw-bottom-0 tw-px-3\">\r\n\r\n</div>\r\n<!-- h-6 -->", styles: [""] }); }
2595
+ }
2596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytConsoleWrapperComponent, decorators: [{
2597
+ type: Component,
2598
+ args: [{ selector: 'cide-lyt-console-wrapper', standalone: true, imports: [], template: "<div id=\"cide-lyt-console-wrapper\" class=\"cide-lyt-console tw-w-full tw-absolute tw-items-center tw-bg-gray-50 tw-h-0 tw-border-b-gray-200 tw-border-solid tw-border-t tw-select-none tw-z-[100] tw-bottom-0 tw-px-3\">\r\n\r\n</div>\r\n<!-- h-6 -->" }]
2599
+ }] });
2600
+
2601
+ class CideLytRequestWrapperComponent {
2602
+ constructor(requestService) {
2603
+ this.requestService = requestService;
2604
+ // Modern Signal-based access for better performance
2605
+ this.requestItems = this.requestService.tabs;
2606
+ }
2607
+ ngAfterViewInit() {
2608
+ // Apply entrance animation to initial items
2609
+ this.applyAnimations();
2610
+ // Listen for changes in request items and apply animations
2611
+ this.requestItemElements.changes.subscribe({
2612
+ next: () => {
2613
+ this.applyAnimations();
2614
+ }
2615
+ });
2616
+ }
2617
+ // Apply animations to request items
2618
+ applyAnimations() {
2619
+ if (!this.requestItemElements)
2620
+ return;
2621
+ this.requestItemElements.forEach((itemEl) => {
2622
+ const element = itemEl.nativeElement;
2623
+ element.classList.remove('request-item-enter');
2624
+ void element.offsetWidth; // Force reflow
2625
+ element.classList.add('request-item-enter');
2626
+ });
2627
+ }
2628
+ // Apply flicker effect to clicked item
2629
+ applyFlickerEffect(event) {
2630
+ const target = event.currentTarget;
2631
+ if (target) {
2632
+ // Remove any existing flicker class
2633
+ target.classList.remove('request-item-flicker');
2634
+ // Force reflow to ensure the class removal is processed
2635
+ void target.offsetWidth;
2636
+ // Add flicker class to trigger animation
2637
+ target.classList.add('request-item-flicker');
2638
+ // Remove the class after animation completes
2639
+ setTimeout(() => {
2640
+ target.classList.remove('request-item-flicker');
2641
+ }, 400); // Match the animation duration
2642
+ }
2643
+ }
2644
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytRequestWrapperComponent, deps: [{ token: CideLytRequestService }], target: i0.ɵɵFactoryTarget.Component }); }
2645
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytRequestWrapperComponent, isStandalone: true, selector: "cide-lyt-request-wrapper", viewQueries: [{ propertyName: "requestItemElements", predicate: ["requestItemEl"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"requestItems() as requestItems\">\n <div id=\"cide-lyt-request-wrapper\" class=\"cide-lyt-request tw-w-[inherit]\" [class.cide-lyt-request-wrapper-hide]=\"!requestItems.length\">\n <div class=\"request-content tw-flex tw-items-center tw-overflow-x-auto\">\n <ng-container *ngFor=\"let item of requestItems; let i = index\">\n <div #requestItemEl class=\"request-item\" (keydown.enter)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\n [class.active]=\"item.active\" tabindex=\"0\" (click)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\n [attr.data-tooltip]=\"item.title\">\n <span class=\"request-title\">{{ item.title }}</span>\n <button class=\"request-action close-action\" \n (click)=\"requestService.closeTab(item.id); $event.stopPropagation();\"\n (keydown.enter)=\"requestService.closeTab(item.id); $event.stopPropagation();\" \n tabindex=\"0\"\n data-tooltip=\"Close this tab\">\n <cide-ele-icon size=\"3xs\">close</cide-ele-icon>\n </button>\n </div>\n <!-- Only add divider between items -->\n <div class=\"request-divider\" *ngIf=\"i < requestItems.length - 1\"></div>\n </ng-container>\n </div>\n </div>\n</ng-container>", styles: [".cide-lyt-request{height:20px;background:linear-gradient(to right,#fff,#f9fafbf2);border-bottom:1px solid rgba(229,231,235,.8);box-shadow:0 2px 6px #0000000d,0 1px 1px #00000008;display:flex;align-items:center;padding:0 .5rem;position:relative;z-index:15;transition:all .2s cubic-bezier(.4,0,.2,1);will-change:transform;-webkit-user-select:none;user-select:none;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.request-content{display:flex;align-items:center;height:100%;width:100%;position:relative;overflow:hidden}.request-item{position:relative;padding:8px 12px;margin:0 4px;border-radius:.375rem;display:flex;align-items:center;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden;background-color:#fff9;box-shadow:0 1px 2px #00000005;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(229,231,235,.4)}.request-item:hover{background-color:#ffffffe6;transform:translateY(-1px);box-shadow:0 2px 5px #0000000d;border-color:#d1d5db99}.request-item:active{transform:translateY(0);box-shadow:0 1px 2px #00000008}.request-item.active{background:#eff6ffcc;border-color:#3b82f64d;box-shadow:0 2px 6px #3b82f61a,0 0 0 1px #3b82f626;position:relative}@keyframes shimmerGradient{0%{background-position:100% 50%}to{background-position:0% 50%}}.request-title{font-size:.875rem;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .2s ease}.request-item.active .request-title{color:#2563eb;font-weight:500;text-shadow:0 0 1px rgba(37,99,235,.1)}.request-action,.request-add-action{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background-color:transparent;transition:all .2s ease}.request-action:hover,.request-add-action:hover{background-color:#f3f4f6cc;transform:scale(1.1)}.request-action:active,.request-add-action:active{transform:scale(.95)}:host-context(.dark-mode) .cide-lyt-request{background:linear-gradient(to right,#0f172a,#0f172af2);border-bottom-color:#1e293be6;box-shadow:0 2px 6px #00000026,0 1px 1px #0000001a}:host-context(.dark-mode) .request-item{background-color:#1e293b99;border-color:#33415566;box-shadow:0 1px 2px #0000001a}:host-context(.dark-mode) .request-item:hover{background-color:#1e293bcc;border-color:#47556999;box-shadow:0 2px 5px #00000026}:host-context(.dark-mode) .request-title{color:#e2e8f0}:host-context(.dark-mode) .request-item:hover .request-title{color:#f8fafc}:host-context(.dark-mode) .request-item.active{background:#1e3a8a4d;border-color:#3b82f666;box-shadow:0 2px 6px #1e40af40,0 0 0 1px #3b82f633}:host-context(.dark-mode) .request-item.active .request-title{color:#60a5fa;text-shadow:0 0 2px rgba(96,165,250,.2)}:host-context(.dark-mode) .request-action:hover,:host-context(.dark-mode) .request-add-action:hover{background-color:#334155cc}.request-item:hover{transform:translateY(-.5px);box-shadow:0 1px 3px #00000008}.request-item:hover:before{opacity:1}.request-item.active{background:linear-gradient(to right,#eff6ffcc,#dbeafe99);box-shadow:0 1px 3px #3b82f626;transform:translateZ(0)}@keyframes glowEffect{0%{opacity:.6;box-shadow:0 1px 2px #3b82f61a}50%{opacity:1;box-shadow:0 1px 3px #3b82f64d}to{opacity:.6;box-shadow:0 1px 2px #3b82f61a}}.request-title{font-size:.7rem;color:#374151;margin-right:.5rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px;letter-spacing:.01em;transition:all .2s ease;position:relative}.request-item.active .request-title{color:#1e40af;font-weight:600;text-shadow:0 0 .5px rgba(37,99,235,.3);letter-spacing:.015em}.request-action{display:flex;align-items:center;justify-content:center;height:14px;width:14px;border-radius:3px;transition:all .2s ease;cursor:pointer;color:#9ca3af;border:none;background:transparent;padding:0;outline:none;position:relative;overflow:hidden;transform:translateZ(0)}.request-action:hover{background-color:#3b82f614;color:#3b82f6;transform:translateY(-.5px) scale(1.05);box-shadow:0 1px 2px #0000000d}.request-action:active{transform:translateY(.5px) scale(.97);transition:all .1s ease}.request-action:focus-visible{outline:1px solid #3b82f6;outline-offset:1px;box-shadow:0 0 0 2px #3b82f61a}.close-action:hover{background-color:#ef444414;color:#ef4444}.close-action:focus-visible{outline-color:#ef4444;box-shadow:0 0 0 2px #ef44441a}.request-divider{width:1px;height:18px;background:linear-gradient(to bottom,#d1d5db1a,#d1d5db80,#d1d5db1a);margin:0 4px}:host-context(.dark-mode) .request-divider{background:linear-gradient(to bottom,#4755691a,#47556980,#4755691a)}.request-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:-1px;width:3px;background:radial-gradient(ellipse at center,#ffffff80,#fff0 70%);opacity:0;transition:opacity .3s ease}.request-content:hover .request-divider:before{opacity:.7}.request-add-action{display:flex;align-items:center;justify-content:center;height:16px;width:16px;border-radius:3px;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;color:#6b7280;background-color:transparent;border:none;padding:0;outline:none;position:relative;overflow:hidden}.request-add-action:hover{background-color:#3b82f614;color:#3b82f6;transform:translateY(-.5px) scale(1.05);box-shadow:0 1px 3px #3b82f626}.request-add-action:active{transform:translateY(.5px) scale(.97);transition:all .1s ease}.request-add-action:focus-visible{outline:1px solid #3b82f6;outline-offset:1px;box-shadow:0 0 0 2px #3b82f61a}.request-add-action:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:radial-gradient(circle,#3b82f64d,#3b82f600 70%);opacity:0;transform:scale(0);transition:transform .4s ease,opacity .3s ease}.request-add-action:active:after{opacity:1;transform:scale(3);transition:transform .1s ease,opacity .1s ease}@keyframes subtlePulse{0%{box-shadow:0 0 #3b82f600;transform:scale(1)}50%{box-shadow:0 0 0 3px #3b82f626;transform:scale(1.05)}to{box-shadow:0 0 #3b82f600;transform:scale(1)}}.request-add-action-pulse{animation:subtlePulse 2s cubic-bezier(.4,0,.6,1) infinite}:host-context(.dark-mode) .cide-lyt-request{background:linear-gradient(to right,#111827f2,#1f2937e6);border-bottom:1px solid rgba(55,65,81,.5)}:host-context(.dark-mode) .request-title{color:#e5e7eb}:host-context(.dark-mode) .request-item.active{background:linear-gradient(to right,#1e3a8a26,#2563eb1a)}:host-context(.dark-mode) .request-item.active .request-title{color:#93c5fd}:host-context(.dark-mode) .request-action,:host-context(.dark-mode) .request-add-action{color:#9ca3af}:host-context(.dark-mode) .request-divider{background:linear-gradient(to bottom,#4b55634d,#6b728080,#4b55634d)}@keyframes slideIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes flickerEffect{0%{opacity:1;transform:scale(1);box-shadow:0 1px 2px #00000005}25%{opacity:.7;transform:scale(.98);box-shadow:0 2px 8px #3b82f64d}50%{opacity:.9;transform:scale(1.02);box-shadow:0 4px 12px #3b82f666}75%{opacity:.8;transform:scale(.99);box-shadow:0 2px 6px #3b82f633}to{opacity:1;transform:scale(1);box-shadow:0 1px 2px #00000005}}@keyframes flickerEffectDark{0%{opacity:1;transform:scale(1);box-shadow:0 1px 2px #0000001a}25%{opacity:.7;transform:scale(.98);box-shadow:0 2px 8px #60a5fa4d}50%{opacity:.9;transform:scale(1.02);box-shadow:0 4px 12px #60a5fa66}75%{opacity:.8;transform:scale(.99);box-shadow:0 2px 6px #60a5fa33}to{opacity:1;transform:scale(1);box-shadow:0 1px 2px #0000001a}}.request-item-enter{animation:slideIn .2s cubic-bezier(.4,0,.2,1)}.request-item-exit{animation:slideOut .2s cubic-bezier(.4,0,.2,1)}.request-item-flicker{animation:flickerEffect .4s cubic-bezier(.4,0,.2,1)}:host-context(.dark-mode) .request-item-flicker{animation:flickerEffectDark .4s cubic-bezier(.4,0,.2,1)}@media (max-width: 640px){.request-title{max-width:80px}}.request-item:focus,.request-action:focus,.request-add-action:focus{outline:none;box-shadow:0 0 0 2px #3b82f64d}:host-context(.dark-mode) .request-item:focus,:host-context(.dark-mode) .request-action:focus,:host-context(.dark-mode) .request-add-action:focus{box-shadow:0 0 0 2px #60a5fa66}.cide-lyt-request:hover{box-shadow:0 3px 8px #00000012,0 1px 2px #0000000d;transform:translateY(-1px)}.request-content:empty .request-add-action{animation:pulseAttention 2s infinite}@keyframes pulseAttention{0%{box-shadow:0 0 #3b82f666;transform:scale(1)}70%{box-shadow:0 0 0 8px #3b82f600;transform:scale(1.05)}to{box-shadow:0 0 #3b82f600;transform:scale(1)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] }); }
2646
+ }
2647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytRequestWrapperComponent, decorators: [{
2648
+ type: Component,
2649
+ args: [{ selector: 'cide-lyt-request-wrapper', standalone: true, imports: [CommonModule, CideIconComponent], template: "<ng-container *ngIf=\"requestItems() as requestItems\">\n <div id=\"cide-lyt-request-wrapper\" class=\"cide-lyt-request tw-w-[inherit]\" [class.cide-lyt-request-wrapper-hide]=\"!requestItems.length\">\n <div class=\"request-content tw-flex tw-items-center tw-overflow-x-auto\">\n <ng-container *ngFor=\"let item of requestItems; let i = index\">\n <div #requestItemEl class=\"request-item\" (keydown.enter)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\n [class.active]=\"item.active\" tabindex=\"0\" (click)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\n [attr.data-tooltip]=\"item.title\">\n <span class=\"request-title\">{{ item.title }}</span>\n <button class=\"request-action close-action\" \n (click)=\"requestService.closeTab(item.id); $event.stopPropagation();\"\n (keydown.enter)=\"requestService.closeTab(item.id); $event.stopPropagation();\" \n tabindex=\"0\"\n data-tooltip=\"Close this tab\">\n <cide-ele-icon size=\"3xs\">close</cide-ele-icon>\n </button>\n </div>\n <!-- Only add divider between items -->\n <div class=\"request-divider\" *ngIf=\"i < requestItems.length - 1\"></div>\n </ng-container>\n </div>\n </div>\n</ng-container>", styles: [".cide-lyt-request{height:20px;background:linear-gradient(to right,#fff,#f9fafbf2);border-bottom:1px solid rgba(229,231,235,.8);box-shadow:0 2px 6px #0000000d,0 1px 1px #00000008;display:flex;align-items:center;padding:0 .5rem;position:relative;z-index:15;transition:all .2s cubic-bezier(.4,0,.2,1);will-change:transform;-webkit-user-select:none;user-select:none;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.request-content{display:flex;align-items:center;height:100%;width:100%;position:relative;overflow:hidden}.request-item{position:relative;padding:8px 12px;margin:0 4px;border-radius:.375rem;display:flex;align-items:center;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden;background-color:#fff9;box-shadow:0 1px 2px #00000005;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(229,231,235,.4)}.request-item:hover{background-color:#ffffffe6;transform:translateY(-1px);box-shadow:0 2px 5px #0000000d;border-color:#d1d5db99}.request-item:active{transform:translateY(0);box-shadow:0 1px 2px #00000008}.request-item.active{background:#eff6ffcc;border-color:#3b82f64d;box-shadow:0 2px 6px #3b82f61a,0 0 0 1px #3b82f626;position:relative}@keyframes shimmerGradient{0%{background-position:100% 50%}to{background-position:0% 50%}}.request-title{font-size:.875rem;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .2s ease}.request-item.active .request-title{color:#2563eb;font-weight:500;text-shadow:0 0 1px rgba(37,99,235,.1)}.request-action,.request-add-action{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background-color:transparent;transition:all .2s ease}.request-action:hover,.request-add-action:hover{background-color:#f3f4f6cc;transform:scale(1.1)}.request-action:active,.request-add-action:active{transform:scale(.95)}:host-context(.dark-mode) .cide-lyt-request{background:linear-gradient(to right,#0f172a,#0f172af2);border-bottom-color:#1e293be6;box-shadow:0 2px 6px #00000026,0 1px 1px #0000001a}:host-context(.dark-mode) .request-item{background-color:#1e293b99;border-color:#33415566;box-shadow:0 1px 2px #0000001a}:host-context(.dark-mode) .request-item:hover{background-color:#1e293bcc;border-color:#47556999;box-shadow:0 2px 5px #00000026}:host-context(.dark-mode) .request-title{color:#e2e8f0}:host-context(.dark-mode) .request-item:hover .request-title{color:#f8fafc}:host-context(.dark-mode) .request-item.active{background:#1e3a8a4d;border-color:#3b82f666;box-shadow:0 2px 6px #1e40af40,0 0 0 1px #3b82f633}:host-context(.dark-mode) .request-item.active .request-title{color:#60a5fa;text-shadow:0 0 2px rgba(96,165,250,.2)}:host-context(.dark-mode) .request-action:hover,:host-context(.dark-mode) .request-add-action:hover{background-color:#334155cc}.request-item:hover{transform:translateY(-.5px);box-shadow:0 1px 3px #00000008}.request-item:hover:before{opacity:1}.request-item.active{background:linear-gradient(to right,#eff6ffcc,#dbeafe99);box-shadow:0 1px 3px #3b82f626;transform:translateZ(0)}@keyframes glowEffect{0%{opacity:.6;box-shadow:0 1px 2px #3b82f61a}50%{opacity:1;box-shadow:0 1px 3px #3b82f64d}to{opacity:.6;box-shadow:0 1px 2px #3b82f61a}}.request-title{font-size:.7rem;color:#374151;margin-right:.5rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px;letter-spacing:.01em;transition:all .2s ease;position:relative}.request-item.active .request-title{color:#1e40af;font-weight:600;text-shadow:0 0 .5px rgba(37,99,235,.3);letter-spacing:.015em}.request-action{display:flex;align-items:center;justify-content:center;height:14px;width:14px;border-radius:3px;transition:all .2s ease;cursor:pointer;color:#9ca3af;border:none;background:transparent;padding:0;outline:none;position:relative;overflow:hidden;transform:translateZ(0)}.request-action:hover{background-color:#3b82f614;color:#3b82f6;transform:translateY(-.5px) scale(1.05);box-shadow:0 1px 2px #0000000d}.request-action:active{transform:translateY(.5px) scale(.97);transition:all .1s ease}.request-action:focus-visible{outline:1px solid #3b82f6;outline-offset:1px;box-shadow:0 0 0 2px #3b82f61a}.close-action:hover{background-color:#ef444414;color:#ef4444}.close-action:focus-visible{outline-color:#ef4444;box-shadow:0 0 0 2px #ef44441a}.request-divider{width:1px;height:18px;background:linear-gradient(to bottom,#d1d5db1a,#d1d5db80,#d1d5db1a);margin:0 4px}:host-context(.dark-mode) .request-divider{background:linear-gradient(to bottom,#4755691a,#47556980,#4755691a)}.request-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:-1px;width:3px;background:radial-gradient(ellipse at center,#ffffff80,#fff0 70%);opacity:0;transition:opacity .3s ease}.request-content:hover .request-divider:before{opacity:.7}.request-add-action{display:flex;align-items:center;justify-content:center;height:16px;width:16px;border-radius:3px;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;color:#6b7280;background-color:transparent;border:none;padding:0;outline:none;position:relative;overflow:hidden}.request-add-action:hover{background-color:#3b82f614;color:#3b82f6;transform:translateY(-.5px) scale(1.05);box-shadow:0 1px 3px #3b82f626}.request-add-action:active{transform:translateY(.5px) scale(.97);transition:all .1s ease}.request-add-action:focus-visible{outline:1px solid #3b82f6;outline-offset:1px;box-shadow:0 0 0 2px #3b82f61a}.request-add-action:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:radial-gradient(circle,#3b82f64d,#3b82f600 70%);opacity:0;transform:scale(0);transition:transform .4s ease,opacity .3s ease}.request-add-action:active:after{opacity:1;transform:scale(3);transition:transform .1s ease,opacity .1s ease}@keyframes subtlePulse{0%{box-shadow:0 0 #3b82f600;transform:scale(1)}50%{box-shadow:0 0 0 3px #3b82f626;transform:scale(1.05)}to{box-shadow:0 0 #3b82f600;transform:scale(1)}}.request-add-action-pulse{animation:subtlePulse 2s cubic-bezier(.4,0,.6,1) infinite}:host-context(.dark-mode) .cide-lyt-request{background:linear-gradient(to right,#111827f2,#1f2937e6);border-bottom:1px solid rgba(55,65,81,.5)}:host-context(.dark-mode) .request-title{color:#e5e7eb}:host-context(.dark-mode) .request-item.active{background:linear-gradient(to right,#1e3a8a26,#2563eb1a)}:host-context(.dark-mode) .request-item.active .request-title{color:#93c5fd}:host-context(.dark-mode) .request-action,:host-context(.dark-mode) .request-add-action{color:#9ca3af}:host-context(.dark-mode) .request-divider{background:linear-gradient(to bottom,#4b55634d,#6b728080,#4b55634d)}@keyframes slideIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes flickerEffect{0%{opacity:1;transform:scale(1);box-shadow:0 1px 2px #00000005}25%{opacity:.7;transform:scale(.98);box-shadow:0 2px 8px #3b82f64d}50%{opacity:.9;transform:scale(1.02);box-shadow:0 4px 12px #3b82f666}75%{opacity:.8;transform:scale(.99);box-shadow:0 2px 6px #3b82f633}to{opacity:1;transform:scale(1);box-shadow:0 1px 2px #00000005}}@keyframes flickerEffectDark{0%{opacity:1;transform:scale(1);box-shadow:0 1px 2px #0000001a}25%{opacity:.7;transform:scale(.98);box-shadow:0 2px 8px #60a5fa4d}50%{opacity:.9;transform:scale(1.02);box-shadow:0 4px 12px #60a5fa66}75%{opacity:.8;transform:scale(.99);box-shadow:0 2px 6px #60a5fa33}to{opacity:1;transform:scale(1);box-shadow:0 1px 2px #0000001a}}.request-item-enter{animation:slideIn .2s cubic-bezier(.4,0,.2,1)}.request-item-exit{animation:slideOut .2s cubic-bezier(.4,0,.2,1)}.request-item-flicker{animation:flickerEffect .4s cubic-bezier(.4,0,.2,1)}:host-context(.dark-mode) .request-item-flicker{animation:flickerEffectDark .4s cubic-bezier(.4,0,.2,1)}@media (max-width: 640px){.request-title{max-width:80px}}.request-item:focus,.request-action:focus,.request-add-action:focus{outline:none;box-shadow:0 0 0 2px #3b82f64d}:host-context(.dark-mode) .request-item:focus,:host-context(.dark-mode) .request-action:focus,:host-context(.dark-mode) .request-add-action:focus{box-shadow:0 0 0 2px #60a5fa66}.cide-lyt-request:hover{box-shadow:0 3px 8px #00000012,0 1px 2px #0000000d;transform:translateY(-1px)}.request-content:empty .request-add-action{animation:pulseAttention 2s infinite}@keyframes pulseAttention{0%{box-shadow:0 0 #3b82f666;transform:scale(1)}70%{box-shadow:0 0 0 8px #3b82f600;transform:scale(1.05)}to{box-shadow:0 0 #3b82f600;transform:scale(1)}}\n"] }]
2650
+ }], ctorParameters: () => [{ type: CideLytRequestService }], propDecorators: { requestItemElements: [{
2651
+ type: ViewChildren,
2652
+ args: ['requestItemEl']
2653
+ }] } });
2654
+
2655
+ class TabContentComponent {
2656
+ constructor(requestService, router, // Inject Router to listen for NavigationEnd
2657
+ cdr) {
2658
+ this.requestService = requestService;
2659
+ this.router = router;
2660
+ this.cdr = cdr;
2661
+ this.currentActiveTabId = null;
2662
+ this.isRestoringScroll = false; // Flag to prevent saving scroll during restoration attempts
2663
+ // Modern Angular signal pattern: Use effect to react to active tab changes
2664
+ effect(() => {
2665
+ const activeTab = this.requestService.activeTab();
2666
+ if (activeTab && activeTab.id !== this.currentActiveTabId) {
2667
+ this.currentActiveTabId = activeTab.id;
2668
+ // Delay scroll restoration to ensure DOM is ready
2669
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
2670
+ delay(100).then(() => this.restoreScrollPosition(activeTab));
2671
+ }
2672
+ });
2673
+ // Listen to route changes for scroll restoration
2674
+ this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe({
2675
+ next: () => {
2676
+ // Use signal to get active tab after navigation
2677
+ const activeTab = this.requestService.activeTab();
2678
+ if (activeTab && activeTab.id !== this.currentActiveTabId) {
2679
+ this.currentActiveTabId = activeTab.id;
2680
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
2681
+ delay(150).then(() => this.restoreScrollPosition(activeTab));
2682
+ }
2683
+ }
2684
+ });
2685
+ }
2686
+ ngAfterViewInit() {
2687
+ // Initial scroll restoration for the active tab
2688
+ const activeTab = this.requestService.activeTab();
2689
+ if (activeTab) {
2690
+ this.currentActiveTabId = activeTab.id;
2691
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
2692
+ delay(50).then(() => this.restoreScrollPosition(activeTab));
2693
+ }
2694
+ }
2695
+ onScroll() {
2696
+ if (this.isRestoringScroll || !this.scrollContainerRef || !this.currentActiveTabId) {
2697
+ return;
2698
+ }
2699
+ const { scrollTop, scrollLeft } = this.scrollContainerRef.nativeElement;
2700
+ this.requestService.updateTabScrollPosition(this.currentActiveTabId, scrollTop, scrollLeft);
2701
+ }
2702
+ restoreScrollPosition(tab) {
2703
+ if (tab && this.scrollContainerRef?.nativeElement) {
2704
+ this.isRestoringScroll = true;
2705
+ const container = this.scrollContainerRef.nativeElement;
2706
+ container.scrollTop = tab.scrollTop ?? 0;
2707
+ container.scrollLeft = tab.scrollLeft ?? 0;
2708
+ // Modern ES2022+ pattern: Use Promise-based delay
2709
+ const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
2710
+ delay(150).then(() => { this.isRestoringScroll = false; }); // Allow scroll event to settle
2711
+ }
2712
+ }
2713
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: TabContentComponent, deps: [{ token: CideLytRequestService }, { token: i2$1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2714
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: TabContentComponent, isStandalone: true, selector: "cide-lyt-tab-content", viewQueries: [{ propertyName: "scrollContainerRef", first: true, predicate: ["scrollContainer"], descendants: true }], ngImport: i0, template: `
2715
+ <div class="tab-content-container" #scrollContainer (scroll)="onScroll()">
2716
+ <router-outlet></router-outlet>
2717
+ </div>
2718
+ `, isInline: true, styles: [":host{height:100%;display:flex;flex-direction:column}.tab-content-container{height:100%;width:100%;position:relative;overflow:auto;display:flex;flex-direction:column;flex:1}::ng-deep router-outlet+*{height:100%;flex:1;display:flex;flex-direction:column}::ng-deep cide-lyt-home-wrapper,::ng-deep cide-adm-home-wrapper,::ng-deep cide-adm-entity,::ng-deep cide-adm-entity-list{height:100%!important;flex:1!important;display:flex!important;flex-direction:column!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
2719
+ }
2720
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: TabContentComponent, decorators: [{
2721
+ type: Component,
2722
+ args: [{ selector: 'cide-lyt-tab-content', standalone: true, imports: [CommonModule, RouterModule], template: `
2723
+ <div class="tab-content-container" #scrollContainer (scroll)="onScroll()">
2724
+ <router-outlet></router-outlet>
2725
+ </div>
2726
+ `, styles: [":host{height:100%;display:flex;flex-direction:column}.tab-content-container{height:100%;width:100%;position:relative;overflow:auto;display:flex;flex-direction:column;flex:1}::ng-deep router-outlet+*{height:100%;flex:1;display:flex;flex-direction:column}::ng-deep cide-lyt-home-wrapper,::ng-deep cide-adm-home-wrapper,::ng-deep cide-adm-entity,::ng-deep cide-adm-entity-list{height:100%!important;flex:1!important;display:flex!important;flex-direction:column!important}\n"] }]
2727
+ }], ctorParameters: () => [{ type: CideLytRequestService }, { type: i2$1.Router }, { type: i0.ChangeDetectorRef }], propDecorators: { scrollContainerRef: [{
2728
+ type: ViewChild,
2729
+ args: ['scrollContainer']
2730
+ }] } });
2731
+
2732
+ class CideLytLayoutWrapperComponent {
2733
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytLayoutWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2734
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideLytLayoutWrapperComponent, isStandalone: true, selector: "cide-lyt-layout-wrapper", ngImport: i0, template: "<div class=\"tw-w-full tw-table tw-h-screen tw-relative\" id=\"cide-lyt-layout-wrapper\">\r\n <!-- We will use here Header -->\r\n <cide-lyt-header-wrapper class=\"tw-table-row tw-h-0\"></cide-lyt-header-wrapper>\r\n <!-- we will use here request tabs -->\r\n <div class=\"tw-table-row\" id=\"cide-lyt-sidebar-page-wrapper\">\r\n <div class=\"cide-lyt-sidebar-page-wrapper tw-h-full tw-w-screen\" id=\"cide-lyt-sidebar-page-inner-wrapper\">\r\n <!-- We will use here Sidebar -->\r\n <cide-lyt-sidebar-wrapper id=\"cide-lyt-sidebar-page\"\r\n class=\"cide-lyt-sidebar-page-hide\"></cide-lyt-sidebar-wrapper>\r\n <!-- We will use here Router Outlet -->\r\n <div class=\"cide-lyt-page-wrapper tw-block tw-h-full tw-w-full\" id=\"cide-lyt-page-wrapper\">\r\n <cide-lyt-request-wrapper class=\"tw-w-[inherit] tw-h-auto\"></cide-lyt-request-wrapper>\r\n <div class=\"cide-lyt-outlet-sidedrawer-wrapper tw-table-row\"\r\n id=\"cide-lyt-outlet-sidedrawer-wrapper\">\r\n <div class=\"tw-w-full tw-h-full tw-overflow-y-auto cide-scrollbar-width-thin\"\r\n id=\"cide-lyt-outlet-wrapper\">\r\n <cide-lyt-tab-content></cide-lyt-tab-content>\r\n </div>\r\n <!-- We will use here Side Drawer -->\r\n <cide-lyt-sidedrawer-wrapper></cide-lyt-sidedrawer-wrapper>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cide-lyt-footer-console-wrapper cide-lyt-footer-console-wrapper-hide tw-relative tw-table-row tw-h-0\"\r\n id=\"cide-lyt-footer-console-wrapper\">\r\n <!-- We will use here footer -->\r\n <cide-lyt-footer-wrapper></cide-lyt-footer-wrapper>\r\n <!-- We will use here Console -->\r\n <cide-lyt-console-wrapper></cide-lyt-console-wrapper>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: CideLytHeaderWrapperComponent, selector: "cide-lyt-header-wrapper" }, { kind: "component", type: CideLytSidebarWrapperComponent, selector: "cide-lyt-sidebar-wrapper" }, { kind: "component", type: CideLytSidedrawerWrapperComponent, selector: "cide-lyt-sidedrawer-wrapper" }, { kind: "component", type: CideLytFooterWrapperComponent, selector: "cide-lyt-footer-wrapper" }, { kind: "component", type: CideLytConsoleWrapperComponent, selector: "cide-lyt-console-wrapper" }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: CideLytRequestWrapperComponent, selector: "cide-lyt-request-wrapper" }, { kind: "component", type: TabContentComponent, selector: "cide-lyt-tab-content" }] }); }
2735
+ }
2736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideLytLayoutWrapperComponent, decorators: [{
2737
+ type: Component,
2738
+ args: [{ selector: 'cide-lyt-layout-wrapper', standalone: true, imports: [
2739
+ CideLytHeaderWrapperComponent,
2740
+ CideLytSidebarWrapperComponent,
2741
+ CideLytSidedrawerWrapperComponent,
2742
+ CideLytFooterWrapperComponent,
2743
+ CideLytConsoleWrapperComponent,
2744
+ RouterModule,
2745
+ CideLytRequestWrapperComponent,
2746
+ TabContentComponent
2747
+ ], template: "<div class=\"tw-w-full tw-table tw-h-screen tw-relative\" id=\"cide-lyt-layout-wrapper\">\r\n <!-- We will use here Header -->\r\n <cide-lyt-header-wrapper class=\"tw-table-row tw-h-0\"></cide-lyt-header-wrapper>\r\n <!-- we will use here request tabs -->\r\n <div class=\"tw-table-row\" id=\"cide-lyt-sidebar-page-wrapper\">\r\n <div class=\"cide-lyt-sidebar-page-wrapper tw-h-full tw-w-screen\" id=\"cide-lyt-sidebar-page-inner-wrapper\">\r\n <!-- We will use here Sidebar -->\r\n <cide-lyt-sidebar-wrapper id=\"cide-lyt-sidebar-page\"\r\n class=\"cide-lyt-sidebar-page-hide\"></cide-lyt-sidebar-wrapper>\r\n <!-- We will use here Router Outlet -->\r\n <div class=\"cide-lyt-page-wrapper tw-block tw-h-full tw-w-full\" id=\"cide-lyt-page-wrapper\">\r\n <cide-lyt-request-wrapper class=\"tw-w-[inherit] tw-h-auto\"></cide-lyt-request-wrapper>\r\n <div class=\"cide-lyt-outlet-sidedrawer-wrapper tw-table-row\"\r\n id=\"cide-lyt-outlet-sidedrawer-wrapper\">\r\n <div class=\"tw-w-full tw-h-full tw-overflow-y-auto cide-scrollbar-width-thin\"\r\n id=\"cide-lyt-outlet-wrapper\">\r\n <cide-lyt-tab-content></cide-lyt-tab-content>\r\n </div>\r\n <!-- We will use here Side Drawer -->\r\n <cide-lyt-sidedrawer-wrapper></cide-lyt-sidedrawer-wrapper>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cide-lyt-footer-console-wrapper cide-lyt-footer-console-wrapper-hide tw-relative tw-table-row tw-h-0\"\r\n id=\"cide-lyt-footer-console-wrapper\">\r\n <!-- We will use here footer -->\r\n <cide-lyt-footer-wrapper></cide-lyt-footer-wrapper>\r\n <!-- We will use here Console -->\r\n <cide-lyt-console-wrapper></cide-lyt-console-wrapper>\r\n </div>\r\n</div>" }]
2748
+ }] });
2749
+
2750
+ class CloudIdeLayoutComponent {
2751
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2752
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CloudIdeLayoutComponent, isStandalone: true, selector: "cide-lyt-wrapper", ngImport: i0, template: `
2753
+ <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
2754
+ `, isInline: true, styles: [""], dependencies: [{ kind: "component", type: CideLytLayoutWrapperComponent, selector: "cide-lyt-layout-wrapper" }] }); }
2755
+ }
2756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeLayoutComponent, decorators: [{
2757
+ type: Component,
2758
+ args: [{ selector: 'cide-lyt-wrapper', standalone: true, template: `
2759
+ <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
2760
+ `, imports: [CideLytLayoutWrapperComponent] }]
2761
+ }] });
2762
+
2763
+ var cloudIdeLayout_component = /*#__PURE__*/Object.freeze({
2764
+ __proto__: null,
2765
+ CloudIdeLayoutComponent: CloudIdeLayoutComponent
2766
+ });
2767
+
2768
+ const layoutRoutes = {
2769
+ path: "control-panel",
2770
+ loadComponent: () => Promise.resolve().then(function () { return cloudIdeLayout_component; }).then(c => c.CloudIdeLayoutComponent),
2771
+ // canActivate: [authGuard]
2772
+ };
2773
+ const layoutControlPannelChildRoutes = [{
2774
+ path: "",
2775
+ pathMatch: "full",
2776
+ redirectTo: "home"
2777
+ },
2778
+ {
2779
+ path: "home",
2780
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DEdsEiaq.mjs').then(c => c.CideLytHomeWrapperComponent),
2781
+ data: {
2782
+ reuseTab: true, // For CustomRouteReuseStrategy
2783
+ sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
2784
+ }
2785
+ }];
2786
+ // {
2787
+ // path: "admin-home",
2788
+ // loadComponent: () => import('../../../cloud-ide-admin/src/lib/admin-module/home/home-wrapper/cide-adm-home-wrapper.component').then(c => c.CideAdmHomeWrapperComponent),
2789
+ // data: {
2790
+ // reuseTab: true, // For CustomRouteReuseStrategy
2791
+ // sypg_page_code: "cide_adm_home" // Example: Ensure this page code is configured in your backend
2792
+ // }
2793
+ // }];
2794
+ // ]
2795
+
2796
+ class CacheManagerService {
2797
+ constructor() {
2798
+ this.sharedService = inject(CideLytSharedService);
2799
+ // Computed cache statistics
2800
+ this.cacheStats = computed(() => {
2801
+ const info = this.sharedService.cacheInfo();
2802
+ return {
2803
+ ...info,
2804
+ hitRatio: info.totalCached > 0 ? (info.validCached / info.totalCached) * 100 : 0,
2805
+ memoryEstimate: this.estimateCacheMemoryUsage()
2806
+ };
2807
+ });
2808
+ // Public access to cache state
2809
+ this.isLoading = (pageCode) => this.sharedService.isLoading(pageCode);
2810
+ this.getCachedData = (pageCode) => this.sharedService.getCachedPageData(pageCode);
2811
+ }
2812
+ /**
2813
+ * Get page data with caching - this is the main method components should use
2814
+ */
2815
+ getPageData(pageCode, forceRefresh = false) {
2816
+ return this.sharedService.loadAndProcessPageData({ sypg_page_code: pageCode }, { forceRefresh, setTitle: true, setSidebarContext: true, updateLayout: true });
2817
+ }
2818
+ /**
2819
+ * Preload multiple pages for better performance
2820
+ */
2821
+ preloadPages(pageCodes) {
2822
+ console.log(`🚀 PRELOADING: Starting preload for ${pageCodes.length} pages`);
2823
+ this.sharedService.preloadPageData(pageCodes);
2824
+ }
2825
+ /**
2826
+ * Invalidate specific page cache
2827
+ */
2828
+ invalidatePage(pageCode) {
2829
+ this.sharedService.invalidateCache(pageCode);
2830
+ }
2831
+ /**
2832
+ * Clear all cache
2833
+ */
2834
+ clearCache() {
2835
+ this.sharedService.clearAllCache();
2836
+ }
2837
+ /**
2838
+ * Get cache status for debugging
2839
+ */
2840
+ getCacheStatus() {
2841
+ const cache = this.sharedService.pageDataCache();
2842
+ const loadingStates = this.sharedService.loadingStates();
2843
+ const allPageCodes = new Set([
2844
+ ...Object.keys(cache),
2845
+ ...Object.keys(loadingStates)
2846
+ ]);
2847
+ return Array.from(allPageCodes).map(pageCode => ({
2848
+ pageCode,
2849
+ cached: !!cache[pageCode],
2850
+ expired: cache[pageCode] ? !this.isCacheValid(cache[pageCode]) : false,
2851
+ loading: !!loadingStates[pageCode]
2852
+ }));
2853
+ }
2854
+ /**
2855
+ * Estimate memory usage of cache (rough estimate)
2856
+ */
2857
+ estimateCacheMemoryUsage() {
2858
+ const cache = this.sharedService.pageDataCache();
2859
+ const jsonString = JSON.stringify(cache);
2860
+ const bytes = new Blob([jsonString]).size;
2861
+ if (bytes < 1024)
2862
+ return `${bytes} B`;
2863
+ if (bytes < 1024 * 1024)
2864
+ return `${(bytes / 1024).toFixed(1)} KB`;
2865
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
2866
+ }
2867
+ /**
2868
+ * Check if cache entry is valid
2869
+ */
2870
+ isCacheValid(cached) {
2871
+ if (!cached)
2872
+ return false;
2873
+ return Date.now() - cached.timestamp < cached.ttl;
2874
+ }
2875
+ /**
2876
+ * Export cache data for debugging or backup
2877
+ */
2878
+ exportCacheData() {
2879
+ return JSON.stringify(this.sharedService.pageDataCache(), null, 2);
2880
+ }
2881
+ /**
2882
+ * Get performance metrics
2883
+ */
2884
+ getPerformanceMetrics() {
2885
+ const stats = this.cacheStats();
2886
+ const loadingStates = this.sharedService.loadingStates();
2887
+ return {
2888
+ totalPages: stats.totalCached,
2889
+ cachedPages: stats.validCached,
2890
+ loadingPages: Object.keys(loadingStates).length,
2891
+ cacheHitRatio: stats.hitRatio,
2892
+ // averageResponseTime could be implemented with timing tracking
2893
+ };
2894
+ }
2895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CacheManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2896
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CacheManagerService, providedIn: 'root' }); }
2897
+ }
2898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CacheManagerService, decorators: [{
2899
+ type: Injectable,
2900
+ args: [{
2901
+ providedIn: 'root'
2902
+ }]
2903
+ }] });
2904
+
2905
+ /*
2906
+ * Public API Surface of cloud-ide-layout
2907
+ */
2908
+
2909
+ /**
2910
+ * Generated bundle index. Do not edit.
2911
+ */
2912
+
2913
+ export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, CideLytSidebarService as a, CideLytRequestService as b, CideLytSidedrawerService as c, CloudIdeLayoutService as d, CloudIdeLayoutComponent as e, CideLytSharedService as f, layoutControlPannelChildRoutes as g, CustomRouteReuseStrategy as h, AppStateService as i, CideLytUserStatusService as j, CacheManagerService as k, layoutRoutes as l };
2914
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DqL3A73V.mjs.map