import { faker } from '@faker-js/faker';
import { GroupKind } from '../../models/kinds.js';
import { nanoid } from '../../nanoid.js';
export class Group {
    /**
     * Generates a random organization object.
     * @param init Optional values to be present in the object.
     * @returns Random organization
     */
    group(init = {}) {
        const { key = nanoid(), name = faker.lorem.word(), color = faker.color.rgb(), oid = nanoid(), owner = nanoid(), createdAt = faker.date.past().getTime(), updatedAt = faker.date.recent().getTime(), description = faker.lorem.sentence(), users = [], icon = faker.image.avatar(), } = init;
        return {
            kind: GroupKind,
            key,
            name,
            color,
            oid,
            owner,
            createdAt,
            updatedAt,
            description,
            users,
            icon,
        };
    }
    /**
     * Generates a list of random organization objects.
     * @param size Number of organizations to generate. Default is 25.
     * @returns List of random organizations
     */
    groups(size = 25) {
        const result = [];
        for (let i = 0; i < size; i++) {
            result.push(this.group());
        }
        return result;
    }
}
//# sourceMappingURL=Group.js.map