mirror of
https://github.com/immich-app/immich.git
synced 2025-11-17 20:13:22 -05:00
23 lines
529 B
TypeScript
23 lines
529 B
TypeScript
class ContextMenuManager {
|
|
#selectedId = $state<string | undefined>(undefined);
|
|
#optionClickCallback = $state<(() => void) | undefined>(undefined);
|
|
|
|
get selectedId() {
|
|
return this.#selectedId;
|
|
}
|
|
|
|
set selectedId(id: string | undefined) {
|
|
this.#selectedId = id;
|
|
}
|
|
|
|
get optionClickCallback() {
|
|
return this.#optionClickCallback;
|
|
}
|
|
|
|
set optionClickCallback(callback: (() => void) | undefined) {
|
|
this.#optionClickCallback = callback;
|
|
}
|
|
}
|
|
|
|
export const contextMenuManager = new ContextMenuManager();
|