import { default as React } from 'react';
export interface WeaveFallbackRecommendationsProps {
/** Recommendation format for fallback display
*
* - 'product': Display as product cards
* - 'tail': Display as tail format (default)
*/
format?: 'product' | 'tail';
/** Optional callback on error */
onError?: (error: Error) => void;
/**
* Message ID for per-message recommendations.
*
* This is the primary identifier for fetching recommendations for a specific message.
*/
messageId: string;
/**
* User query text for generating recommendations.
*
* This is the query that will be used to fetch recommendations from the backend.
* Typically the user's question or search query.
*
* IMPORTANT: This should be a non-empty string. If not provided or empty,
* the component will skip rendering to prevent 400 Bad Request errors.
* The backend requires a valid query parameter.
*/
query?: string;
/**
* Fallback state - controls whether to show recommendations
* When true, recommendations will be fetched and displayed
* When false or undefined, component will not render
*/
fallback?: boolean;
/**
* Previously fetched recommendations from WeaveAdFormatContainer.
* If provided and not empty, these will be rendered directly without making a new API call.
* Only makes a new API call if this is empty/null/undefined.
*/
previousRecommendations?: any[];
}
/**
* WeaveFallbackRecommendations - Weave Format Fallback Component
*
* Displays recommendations as a fallback UI when no AdMesh links are detected
* in the LLM response. Works independently without requiring WeaveAdFormatContext.
*
* This component will:
* - Accept messageId, query, and fallback state as props
* - Only render when fallback prop is true
* - If previousRecommendations are provided and not empty: renders them directly (no API call)
* - If previousRecommendations are empty/null: calls SDK's showRecommendations() to fetch recommendations
* - Display recommendations in the specified format (tail or product)
*
* IMPORTANT: Pass previousRecommendations from WeaveAdFormatContainer to avoid duplicate API calls.
*
* @example
* ```tsx
* const [fallback, setFallback] = useState(false);
*
*
*
* {llmResponseContent}
*
*
*
* ```
*/
export declare const WeaveFallbackRecommendations: React.FC;
export default WeaveFallbackRecommendations;
//# sourceMappingURL=WeaveFallbackRecommendations.d.ts.map