mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04: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();
|