2021-07-07 18:07:58 +02:00
|
|
|
import { derived } from "svelte/store";
|
2021-08-26 12:01:07 +02:00
|
|
|
import { menuInputFocusStore } from "./MenuStore";
|
2021-07-07 18:07:58 +02:00
|
|
|
import { chatInputFocusStore } from "./ChatStore";
|
2021-06-21 17:19:27 +02:00
|
|
|
|
|
|
|
//derived from the focus on Menu, ConsoleGlobal, Chat and ...
|
|
|
|
export const enableUserInputsStore = derived(
|
2021-08-26 12:01:07 +02:00
|
|
|
[menuInputFocusStore, chatInputFocusStore],
|
|
|
|
([$menuInputFocusStore, $chatInputFocusStore]) => {
|
|
|
|
return !$menuInputFocusStore && !$chatInputFocusStore;
|
2021-06-21 17:19:27 +02:00
|
|
|
}
|
2021-07-07 18:07:58 +02:00
|
|
|
);
|