import { atom } from "recoil" ; import EditorTab from "../modules/editor_tab" ; import { Prompt } from "../modules/prompt" ; import { StatusBarItem } from "../modules/statusbar_item" ; import { FloatingWindow } from "../modules/windows" ; import GlobalPrompt from "../prompts/global" ; import TextEditorTab from "../tabs/text_editor" ; import { FocusedTab , FolderState , PanelState , TabsPanels , } from "../types/types" ; import { Client } from "./client" ; export const openedTabsState = atom ( { key : "openedTabs" , default : [ [ [ ] ] ] as TabsPanels , dangerouslyAllowMutability : true , } ) ; export const panels = atom ( { key : "panels" , default : [ ] as Array < PanelState > , } ) ; export const clientState = atom ( { key : "clientState" , default : null as unknown as Client , } ) ; export const focusedTab = atom < FocusedTab > ( { key : "focusedTab" , default : { row : 0 , col : 0 , id : null , tab : null } , dangerouslyAllowMutability : true , } ) ; export const prompts = atom < typeof Prompt [ ] > ( { key : "prompts" , default : [ GlobalPrompt ] , } ) ; export const editors = atom < typeof EditorTab [ ] > ( { key : "editors" , default : [ TextEditorTab ] , } ) ; export const openedFolders = atom < FolderState [ ] > ( { key : "openedFolders" , default : [ ] , } ) ; export const showedWindows = atom < FloatingWindow [ ] > ( { key : "showedWindows" , default : [ ] , } ) ; export const showedStatusBarItem = atom < StatusBarItem [ ] > ( { key : "showedStatusBarItem" , default : [ ] , } ) ;