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

export class FilesDroppedEvent {
    "files": string[];
    "target": string;

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

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

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

// Private type creation functions
const $$createType0 = $Create.Array($Create.Any);
