import type { SortBy } from "components/system/Files/FileManager/useSortBy"; import type { Size } from "components/system/Window/RndWindow/useResizable"; import type { Position } from "react-rnd"; import type { ThemeName } from "styles/themes"; export type UpdateFiles = (newFile?: string, oldFile?: string) => void; export type WindowState = { maximized?: boolean; position?: Position; size?: Size; }; export type WindowStates = Record; export type WallpaperFit = "center" | "fill" | "fit" | "stretch" | "tile"; type SortOrder = [string[], SortBy, boolean]; export type SortOrders = Record; export type ClockSource = "local" | "ntp"; export type IconPosition = { gridColumnStart: number; gridRowStart: number; }; export type IconPositions = Record; export type SessionData = { aiApi: string; clockSource: ClockSource; iconPositions: IconPositions; runHistory: string[]; sortOrders: SortOrders; themeName: ThemeName; wallpaperFit: WallpaperFit; wallpaperImage: string; windowStates: WindowStates; }; export type SessionContextState = SessionData & { foregroundId: string; prependToStack: (id: string) => void; removeFromStack: (id: string) => void; sessionLoaded: boolean; setClockSource: React.Dispatch>; setForegroundId: React.Dispatch>; setHaltSession: React.Dispatch>; setIconPositions: React.Dispatch>; setRunHistory: React.Dispatch>; setSortOrder: ( directory: string, order: string[] | ((currentSortOrder: string[]) => string[]), sortBy?: SortBy, ascending?: boolean ) => void; setThemeName: React.Dispatch>; setWallpaper: (image: string, fit?: WallpaperFit) => void; setWindowStates: React.Dispatch>; stackOrder: string[]; };