import { HookEnableParam } from '../../shared/hooks/types'; import { QueryRecommendation } from './api/types.js'; /** @internal */ export declare const DEFAULT_RECOMMENDATIONS_COUNT = 4; export interface GetQueryRecommendationsParams { /** Data model title or perspective title */ contextTitle: string; /** * Number of recommendations that should be returned * * If not specified, the default value is `4` */ count?: number; /** * Enable suggested axis titles in generated widget * * If not specified, the default value is `false` * * @internal */ enableAxisTitlesInWidgetProps?: boolean; /** * Pass a custom prompt to AI when generating query recommendations * * e.g. "Focus on age range" * */ customPrompt?: string; } /** * Parameters for {@link useGetQueryRecommendations} hook. */ export interface UseGetQueryRecommendationsParams extends GetQueryRecommendationsParams, HookEnableParam { } /** * State for {@link useGetQueryRecommendations} hook. */ export interface UseGetQueryRecommendationsState { /** Whether the data fetching is loading */ isLoading: boolean; /** Whether the data fetching has failed */ isError: boolean; /** Whether the data fetching has succeeded */ isSuccess: boolean; /** The result data */ data: QueryRecommendation[] | undefined; /** The error if any occurred */ error: unknown; /** Callback to trigger a refetch of the data */ refetch: () => void; } /** * @param params - {@link UseGetQueryRecommendationsParams} * @internal */ export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRecommendationsParams) => UseGetQueryRecommendationsState; /** * React hook that fetches recommended questions for a data model or perspective. * * This hook includes the same code that fetches the initial suggested questions in the chatbot. * * @example * ```tsx * const { data, isLoading } = useGetQueryRecommendations({ * contextTitle: 'Sample ECommerce', * }); * * if (isLoading) { * return