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

/**
 * Bundle stores a set of messages and pluralization rules.
 * Most applications only need a single bundle
 * that is initialized early in the application's lifecycle.
 * It is not goroutine safe to modify the bundle while Localizers
 * are reading from it.
 */
export class Bundle {

    /** Creates a new Bundle instance. */
    constructor($$source: Partial<Bundle> = {}) {

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

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