type Menu = "options" | "clock" | "user" | "touchScreen"; export const useSettingsStore = defineStore("settings", { state: () => ({ currentMenu: null as Menu | null, currentSubMenu: null as string | null, menuExpanded: false, }), actions: { openMenu(menu: Menu, expanded: boolean = false) { this.currentMenu = menu; this.menuExpanded = expanded; this.currentSubMenu = null; }, openSubMenu(submenu: string) { this.currentSubMenu = submenu; }, closeSubMenu() { this.currentSubMenu = null; }, }, });