/** * useRecommendations Hook * * Manages recommendation state and actions in the UI. * * @since v1.66.2 */ import { type Recommendation, type RecommendationPreferences } from '../../core/recommendations/recommendation-types.js'; import type { RegistryPlugin } from '../../core/registry/registry-types.js'; export interface UseRecommendationsOptions { /** Currently installed plugins */ installedPlugins: RegistryPlugin[]; /** All available plugins from registry */ registryPlugins: RegistryPlugin[]; /** Whether to auto-refresh on plugin changes */ autoRefresh?: boolean; /** Maximum recommendations to return */ maxRecommendations?: number; /** Initial preferences */ preferences?: Partial; } export interface UseRecommendationsResult { /** Current recommendations */ recommendations: Recommendation[]; /** Whether recommendations are loading */ loading: boolean; /** Error if any */ error: string | null; /** Last refresh timestamp */ lastRefreshed: Date | null; /** Refresh recommendations */ refresh: () => Promise; /** Dismiss a recommendation */ dismiss: (pluginId: string) => void; /** Save a recommendation for later */ save: (pluginId: string) => void; /** Unsave a recommendation */ unsave: (pluginId: string) => void; /** Record that a recommendation was installed */ recordInstall: (pluginId: string) => void; /** Get saved recommendations */ savedRecommendations: Recommendation[]; /** Current preferences */ preferences: RecommendationPreferences; /** Update preferences */ updatePreferences: (updates: Partial) => void; } export declare function useRecommendations({ installedPlugins, registryPlugins, autoRefresh, maxRecommendations, preferences: initialPreferences, }: UseRecommendationsOptions): UseRecommendationsResult; //# sourceMappingURL=useRecommendations.d.ts.map