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

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as application$0 from "../../../../wailsapp/wails/v3/pkg/application/models.js";

/**
 * Config provides access to application configuration.
 */
export type Config = any;

/**
 * Core is the central application object that manages services, assets, and communication.
 */
export class Core {
    "App": application$0.App | null;
    "Features": Features | null;

    /** Creates a new Core instance. */
    constructor($$source: Partial<Core> = {}) {
        if (!("App" in $$source)) {
            this["App"] = null;
        }
        if (!("Features" in $$source)) {
            this["Features"] = null;
        }

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

    /**
     * Creates a new Core instance from a string or object.
     */
    static createFrom($$source: any = {}): Core {
        const $$createField0_0 = $$createType1;
        const $$createField1_0 = $$createType3;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("App" in $$parsedSource) {
            $$parsedSource["App"] = $$createField0_0($$parsedSource["App"]);
        }
        if ("Features" in $$parsedSource) {
            $$parsedSource["Features"] = $$createField1_0($$parsedSource["Features"]);
        }
        return new Core($$parsedSource as Partial<Core>);
    }
}

/**
 * Features provides a way to check if a feature is enabled.
 * This is used for feature flagging and conditional logic.
 */
export class Features {
    /**
     * Flags is a list of enabled feature flags.
     */
    "Flags": string[];

    /** Creates a new Features instance. */
    constructor($$source: Partial<Features> = {}) {
        if (!("Flags" in $$source)) {
            this["Flags"] = [];
        }

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

    /**
     * Creates a new Features instance from a string or object.
     */
    static createFrom($$source: any = {}): Features {
        const $$createField0_0 = $$createType4;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("Flags" in $$parsedSource) {
            $$parsedSource["Flags"] = $$createField0_0($$parsedSource["Flags"]);
        }
        return new Features($$parsedSource as Partial<Features>);
    }
}

// Private type creation functions
const $$createType0 = application$0.App.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = Features.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = $Create.Array($Create.Any);
