// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";

/**
 * WindowState 定义窗口状态
 */
export class WindowState {
    "Width": number;
    "Height": number;
    "X": number;
    "Y": number;
    "Maximised": boolean;

    /** Creates a new WindowState instance. */
    constructor($$source: Partial<WindowState> = {}) {
        if (!("Width" in $$source)) {
            this["Width"] = 0;
        }
        if (!("Height" in $$source)) {
            this["Height"] = 0;
        }
        if (!("X" in $$source)) {
            this["X"] = 0;
        }
        if (!("Y" in $$source)) {
            this["Y"] = 0;
        }
        if (!("Maximised" in $$source)) {
            this["Maximised"] = false;
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new WindowState instance from a string or object.
     */
    static createFrom($$source: any = {}): WindowState {
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        return new WindowState($$parsedSource as Partial<WindowState>);
    }
}
