import { type Size } from "../../components/Window/RndWindow/useResizable"; export type RelativePosition = { bottom?: number; left?: number; right?: number; top?: number; }; export type BaseWindowArguments = { groupByProcess?: boolean; // Default = true allowResizing?: boolean; // Default = true autoSizing?: boolean; backgroundColor?: string; hideMaximizeButton?: boolean; hideMinimizeButton?: boolean; hideTaskbarEntry?: boolean; hideTaskbarLabel?: boolean; hideTitlebar?: boolean; hideTitlebarIcon?: boolean; initialRelativePosition?: RelativePosition; lockAspectRatio?: boolean; }; export type WindowArguments = BaseWindowArguments; type ProcessOfWindow = { pid: string; }; export type WindowElements = { componentWindow?: HTMLElement; peekElement?: HTMLElement; taskbarEntry?: HTMLElement; }; type MediaPlayerWindowArguments = { pause?: () => void; paused?: (callback?: (paused: boolean) => void) => boolean; play?: () => void; }; export type WindowIconType = string | React.ReactNode; // Define the StackInfo type with possible layout types export type SnapInfo = { type?: "twoColumns" | "threeColumns" | "fourGrid" | "threeLeftOneRight" | "threeRightOneLeft" | "fiveLeftGridRight" | "fiveRightGridLeft"; index?: number; widthPercent?: number; // 0 - 100% of the possible width. heightPercent?: number; // 0 - 100% of the possible height. default is 100% }; // Define the StackType type, which can be either a boolean or StackInfo export type SnapType = boolean | SnapInfo; export type WindowData = BaseWindowArguments & WindowElements & MediaPlayerWindowArguments & { Component: React.ReactNode | React.ComponentType; id: RD_WindowID_T; process?: ProcessOfWindow; icon?: WindowIconType; titlebarIcon?: WindowIconType; defaultSize?: Size; progress?: number; closing?: boolean; maximized?: boolean; minimized?: boolean; snap?: SnapInfo | boolean; preferAppIcon?: boolean; title?: string; renderTitlebar?: string | React.ReactNode | React.ComponentType; renderTaskbar?: string | React.ReactNode | React.ComponentType; renderTitle?: string | React.ReactNode; }; export type NewWindowArguments = Omit export type RD_WindowID_T = string; export type Windows = Record;