export type InvitedSignupOverrides = {
  emailVerified: true;
  onboardingCompletedAt: Date;
};

/**
 * Fields layered onto a freshly-created user whose address already has a pending
 * organization invitation.
 *
 * The invite link proves the address, so email verification is skipped. That
 * part is live and load-bearing.
 *
 * ⚠️ `onboardingCompletedAt` is INERT and kept only because the column still
 * exists. It used to make the invited member skip the wizard; the wizard gate is
 * now derived from the product's own state (`shouldEnterWizard`, fed by
 * `deriveActivationFlags`), and NOTHING reads this column any more. The invited
 * member is covered by the gate itself — they join an org that already has its
 * sites, so `requiredDone` is true — or, joining an empty org, by the defer exit.
 * Drop this field together with the column, in the migration that removes it.
 */
export function invitedSignupOverrides(now: Date): InvitedSignupOverrides {
  return { emailVerified: true, onboardingCompletedAt: now };
}
