/**
* React Query Hook for Single Campaign
* Provides caching, automatic refetching, and state management for campaign data
*/
import type { CampaignEntity } from '@plyaz/types/campaign';
import type { ServiceOptions } from '@plyaz/types/api';
import type { EndpointsList } from '@/api/endpoints';
import type { QueryKey, UseQueryResult, ApiQueryOptions } from '@plyaz/types/api';
/**
* Hook for fetching a single campaign
* Accepts the same parameters as fetchCampaign, plus React Query options
*
* @param queryKey - React Query cache key
* @param campaignId - ID of the campaign to fetch
* @param serviceOptions - Optional service options (apiClient override, apiConfig override)
* @param queryOptions - Optional React Query options (enabled, staleTime, etc.)
* @returns React Query result with campaign data
*
* @example
* ```typescript
* function CampaignDetails({ id }: Props) {
* const { data, isLoading, error } = useCampaign(['campaign', id], id);
*
* if (isLoading) return ;
* if (error) return ;
*
* return ;
* }
*
* // With service options override
* const { data } = useCampaign(
* ['campaign', id],
* id,
* { apiConfig: { timeout: 5000 } }
* );
*
* // With React Query options override
* const { data } = useCampaign(
* ['campaign', id],
* id,
* undefined,
* { enabled: !!id, refetchOnWindowFocus: false }
* );
* ```
*/
export declare function useCampaign(queryKey: QueryKey, campaignId: string, serviceOptions?: ServiceOptions, queryOptions?: Omit, 'apiClient' | 'apiConfig'>): UseQueryResult;
//# sourceMappingURL=useCampaign.d.ts.map