import React, { type JSX } from 'react'; import { RecentIcon, CloseIcon, StarIcon, SparklesIcon } from './icons'; import { Results } from './Results'; import type { ScreenStateProps } from './ScreenState'; import type { InternalDocSearchHit } from './types'; export type StartScreenTranslations = Partial<{ recentSearchesTitle: string; noRecentSearchesText: string; saveRecentSearchButtonTitle: string; removeRecentSearchButtonTitle: string; favoriteSearchesTitle: string; removeFavoriteSearchButtonTitle: string; recentConversationsTitle: string; removeRecentConversationButtonTitle: string; }>; type StartScreenProps = Omit, 'translations'> & { hasCollections: boolean; translations?: StartScreenTranslations; }; export function StartScreen({ translations = {}, ...props }: StartScreenProps): JSX.Element | null { const { recentSearchesTitle = 'Recent', saveRecentSearchButtonTitle = 'Save this search', removeRecentSearchButtonTitle = 'Remove this search from history', favoriteSearchesTitle = 'Favorite', removeFavoriteSearchButtonTitle = 'Remove this search from favorites', recentConversationsTitle = 'Recent conversations', removeRecentConversationButtonTitle = 'Remove this conversation from history', } = translations; return (
(
)} renderAction={({ item, runFavoriteTransition, runDeleteTransition }) => ( <>
)} /> (
)} renderAction={({ item, runDeleteTransition }) => (
)} /> (
)} renderAction={({ item, runDeleteTransition }) => (
)} />
); }