// 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";

/**
 * AppTabDefinition 应用 Tab 定义（前端格式）
 */
export class AppTabDefinition {
    "key": string;
    "title": string;
    "visible": boolean;
    "enabled": boolean;

    /** Creates a new AppTabDefinition instance. */
    constructor($$source: Partial<AppTabDefinition> = {}) {
        if (!("key" in $$source)) {
            this["key"] = "";
        }
        if (!("title" in $$source)) {
            this["title"] = "";
        }
        if (!("visible" in $$source)) {
            this["visible"] = false;
        }
        if (!("enabled" in $$source)) {
            this["enabled"] = false;
        }

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

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