import Alpine from 'alpinejs'; const COLLAPSED_KEY = 'aethera-chat-sidebar-collapsed'; interface ChatSidebarStore { mobileOpen: boolean; collapsed: boolean; toggleMobile(): void; toggleCollapsed(): void; } const store: ChatSidebarStore = { mobileOpen: false, collapsed: localStorage.getItem(COLLAPSED_KEY) === 'true', toggleMobile() { this.mobileOpen = !this.mobileOpen; }, toggleCollapsed() { this.collapsed = !this.collapsed; localStorage.setItem(COLLAPSED_KEY, String(this.collapsed)); }, }; Alpine.store('chatSidebar', store);