import { z } from "zod";

import {
  arrayOrEmpty,
  booleanOrFalse,
  numberOrZero,
  schemaOr,
  stringOrEmpty,
  stringOrNull,
} from "../nullable-defaults";
import {
  PrivateRoomMomentSchema,
  PrivateRoomProfileSchema,
} from "./private_room";

export const PrivateRoomMomentsResponseSchema = z.object({
  profile: schemaOr(PrivateRoomProfileSchema, {
    characterId: "elio",
    displayName: "Elio Silvestri",
    authorName: "Elio Silvestri",
    avatarUrl: null,
    coverUrl: null,
    title: "Elio Private room",
    subtitle: "Join me, unlock my private room",
  }),
  items: arrayOrEmpty(PrivateRoomMomentSchema),
  nextCursor: stringOrNull,
  hasMore: booleanOrFalse,
  creditBalance: numberOrZero,
  unlockCostDefault: numberOrZero,
  unlockCostPerImage: numberOrZero,
  currency: stringOrEmpty,
  source: stringOrEmpty,
});

export type PrivateRoomMomentsResponseInput = z.input<
  typeof PrivateRoomMomentsResponseSchema
>;
export type PrivateRoomMomentsResponseData = z.output<
  typeof PrivateRoomMomentsResponseSchema
>;
