import { Internet, Types, Person, Random } from '@pawel-up/data-mock';
import { Kind as UserKind } from '../../models/store/User.js';
export class User {
    person;
    types;
    internet;
    random;
    constructor(init = {}) {
        this.person = new Person(init);
        this.types = new Types(init.seed);
        this.internet = new Internet(init);
        this.random = new Random(init.seed);
    }
    user(init = {}) {
        const result = {
            kind: UserKind,
            key: this.types.uuid(),
            name: this.person.name(),
        };
        if (!init.noEmail) {
            result.email = [
                {
                    email: this.internet.email(),
                    verified: this.types.boolean(),
                },
            ];
        }
        if (!init.noPicture) {
            result.picture = {
                url: this.internet.avatar(),
            };
        }
        if (!init.noProvider) {
            result.provider = {
                refreshToken: this.types.uuid(),
            };
        }
        return result;
    }
}
//# sourceMappingURL=User.js.map