import { z } from "zod";

import { stringOrEmpty } from "../../nullable-defaults";
import { UserSchema } from "../../user/user";

export const TopUpHandoffResponseSchema = z
  .object({
    user: UserSchema,
    token: z.string(),
    refreshToken: stringOrEmpty,
    loginStatus: z.enum([
      "email",
      "google",
      "facebook",
      "facebookMessenger",
    ]),
    merged: z.boolean().default(false),
  })
  .readonly();

export type TopUpHandoffResponse = z.output<
  typeof TopUpHandoffResponseSchema
>;
