/** * React Query Mutation Hook for Checking Feature Flag * Checks if a feature flag is enabled for the given context */ import { createApiMutation } from '../../../hooks/factories'; import { type CheckFeatureFlagEnabledPayload } from './checkFeatureFlagEnabled'; import type { IsEnabledResponse, ServiceOptions, FeatureFlagErrorResponse } from '@plyaz/types/api'; import type { EndpointsList } from '@/api/endpoints'; /** * Hook for checking if a feature flag is enabled * * @param serviceOptions - Service options (apiClient, apiConfig, updateConfigOptions) * @param mutationOptions - React Query mutation options * @returns React Query mutation result * * @example * ```typescript * // Basic usage * const { mutateAsync, isPending } = useCheckFeatureFlagEnabled(); * * const checkFlag = async () => { * const result = await mutateAsync({ key: 'new-feature' }); * if (result.isEnabled) { * // Show new feature * } * }; * * // With context * const result = await mutateAsync({ * key: 'premium-feature', * context: { userId: 'user-123', userRole: 'premium' } * }); * * // In component with immediate check * useEffect(() => { * mutateAsync({ key: 'feature-x', context: userContext }) * .then(r => setFeatureEnabled(r.isEnabled)); * }, [userContext]); * ``` */ export declare function useCheckFeatureFlagEnabled(serviceOptions?: ServiceOptions, mutationOptions?: Parameters, unknown, TEndpoints>>>[1]): ReturnType, unknown, TEndpoints>>>; //# sourceMappingURL=useCheckFeatureFlagEnabled.d.ts.map