| 1 | import * as Schema from "effect/Schema"; |
| 2 | |
| 3 | import { getLocalStorageItem, useLocalStorage } from "./useLocalStorage"; |
| 4 | |
| 5 | const TERMINAL_PLACEMENT_STORAGE_KEY = "t3code.terminalPlacement"; |
| 6 | const TerminalPlacement = Schema.Literals(["right", "bottom"]); |
| 7 | |
| 8 | export function useTerminalPlacement() { |
| 9 | return useLocalStorage(TERMINAL_PLACEMENT_STORAGE_KEY, "right", TerminalPlacement); |
| 10 | } |
| 11 | |
| 12 | export function getTerminalPlacement() { |
| 13 | return getLocalStorageItem(TERMINAL_PLACEMENT_STORAGE_KEY, TerminalPlacement) ?? "right"; |
| 14 | } |