import { Injectable } from '@nestjs/common';
import { UserAccount } from './user-account.aggregate';
import { AccountSequence, PhoneNumber } from '@/domain/value-objects';

@Injectable()
export class UserAccountFactory {
  createAutomatic(params: {
    accountSequence: AccountSequence;
    initialDeviceId: string;
    deviceName?: string;
    inviterSequence: AccountSequence | null;
  }): UserAccount {
    return UserAccount.createAutomatic(params);
  }

  create(params: {
    accountSequence: AccountSequence;
    phoneNumber: PhoneNumber;
    initialDeviceId: string;
    deviceName?: string;
    inviterSequence: AccountSequence | null;
  }): UserAccount {
    return UserAccount.create(params);
  }
}
