import { type Position } from "react-rnd"; import { type Size } from "../../components/Window/RndWindow/useResizable"; // import { type Size } from "components/system/Window/RndWindow/useResizable"; declare global { interface Window { sessionIsWriteable: boolean; } } type OSItem = "taskbar" | "menubar" | "desktop" | (React.ReactElement | React.ReactNode) export type Layout = { top?: OSItem[]; center?: OSItem[]; bottom?: OSItem[]; } export type WindowState = { maximized?: boolean; position?: Position; size?: Size; }; export type WindowStates = Record; export type WallpaperFit = "center" | "fill" | "fit" | "stretch" | "tile"; export type ClockSource = "local" | "ntp"; export type IconPosition = { gridColumnStart: number; gridRowStart: number; }; export type IconPositions = Record; type ThemeName = string; export type WallpaperState = boolean | { type?: "image" | "video"; src?: string; } export type SessionData = { clockSource: ClockSource; themeName: ThemeName; cursor: string; wallpaperFit: WallpaperFit; wallpaper: WallpaperState; windowStates: WindowStates; }; export type SessionContextState = SessionData & { previewID: boolean | string; foregroundId: string; sessionLoaded: boolean; setClockSource: React.Dispatch>; setCursor: React.Dispatch>; prependToStack: (id: string) => void; removeFromStack: (id: string) => void; setForegroundId: React.Dispatch>; setPreviewID: React.Dispatch>; setHaltSession: React.Dispatch>; setThemeName: React.Dispatch>; setWallpaper: (wallpaperData: WallpaperState, fit?: WallpaperFit) => void; setWindowStates: React.Dispatch>; stackOrder: string[]; };