import { faker } from '@faker-js/faker';
import { ProjectKind, DomainFileKind, CertificateFileKind, FolderKind, ApiFileKind } from '../../models/kinds.js';
import { nanoid } from '../../nanoid.js';
export class Trash {
    /**
     * Generates a random invitation object.
     * @param init Optional values to be present in the object.
     * @returns Random invitation
     */
    trashEntry(init = {}) {
        const { key = nanoid(), refKey = nanoid(), kind = faker.helpers.arrayElement([
            ProjectKind,
            DomainFileKind,
            CertificateFileKind,
            FolderKind,
            ApiFileKind,
        ]), info = { byMe: false, time: faker.date.recent().getTime(), user: nanoid(), name: faker.system.fileName() }, capabilities = { canDelete: true, canRestore: true }, } = init;
        return {
            key,
            refKey,
            kind,
            info,
            capabilities,
        };
    }
    /**
     * Generates a list of random invitation objects.
     * @param size Number of invitations to generate. Default is 25.
     * @returns List of random invitations
     */
    trashEntries(size = 25) {
        const result = [];
        for (let i = 0; i < size; i++) {
            result.push(this.trashEntry());
        }
        return result;
    }
}
//# sourceMappingURL=Trash.js.map