/** * VIP Offers Hook using TanStack Query * Simplified VIP offer management with automatic cache invalidation */ import { VipOffer, VipPreviewResponse } from '../../core/resources/vipOffers'; export interface UseVipOffersQueryOptions { /** * Checkout session ID for VIP offers */ sessionId?: string; /** * Array of VIP offer IDs to manage */ vipOfferIds: string[]; /** * Whether to automatically fetch VIP preview on mount * @default true */ enabled?: boolean; /** * Callback when VIP offers are selected */ onSelectSuccess?: () => void; /** * Callback when VIP offers are cancelled */ onCancelSuccess?: () => void; } export interface UseVipOffersQueryResult { /** * Array of VIP offers */ vipOffers: VipOffer[]; /** * VIP preview data including savings and selected offers */ vipPreview: VipPreviewResponse | undefined; /** * Loading state for VIP preview */ isLoadingVipPreview: boolean; /** * Whether any VIP offers are currently selected */ hasVip: boolean; /** * Check if a specific VIP offer is selected */ isOfferSelected: (offer: VipOffer) => boolean; /** * Select all VIP offers */ selectVipOffers: () => Promise; /** * Cancel/deselect all VIP offers */ cancelVipOffers: () => Promise; /** * Refresh VIP preview data */ refreshVipPreview: () => Promise; /** * Loading state for select/cancel operations */ isSelecting: boolean; isCanceling: boolean; /** * Error state */ error: Error | null; } export declare function useVipOffersQuery(options: UseVipOffersQueryOptions): UseVipOffersQueryResult;