import axiosInstance from '@/config/axios' import { unwrapApiPayload } from '@/helpers/listResponse' export interface EventViewerState { isOwner: boolean isBookmarked: boolean isFollowingOrganizer: boolean activeBooking: { id: string; status: 'pending_payment' | 'confirmed' } | null waitlistEntry: { id: string; status: 'waiting' | 'notified' | 'accepted' } | null exactLocation: { address: string; lat: number; lng: number } | null canJoinAudience: boolean audienceBlockReasons: ('gender' | 'age' | 'city')[] } export async function fetchEventViewerState(eventId: string): Promise { const response = await axiosInstance.get(`events/${eventId}/viewer-state`) return unwrapApiPayload(response.data) }