import type {
  PrivateRoomMoment,
  PrivateRoomProfile,
} from "@/data/dto/private-room";

export interface PrivateRoomUnlockPaywallRequest {
  momentId: string;
  reason: string;
  requiredCredits: number;
  currentCredits: number;
  shortfallCredits: number;
}

export interface PrivateRoomState {
  profile: PrivateRoomProfile | null;
  items: PrivateRoomMoment[];
  nextCursor: string | null;
  hasMore: boolean;
  creditBalance: number;
  errorMessage: string | null;
  unlockingMomentId: string | null;
  unlockErrorMessage: string | null;
  pendingConfirmMomentId: string | null;
  unlockPaywallRequest: PrivateRoomUnlockPaywallRequest | null;
  unlockSuccessNonce: number;
}

export const initialState: PrivateRoomState = {
  profile: null,
  items: [],
  nextCursor: null,
  hasMore: false,
  creditBalance: 0,
  errorMessage: null,
  unlockingMomentId: null,
  unlockErrorMessage: null,
  pendingConfirmMomentId: null,
  unlockPaywallRequest: null,
  unlockSuccessNonce: 0,
};
