import { ChatFolder, Conversation } from '@/types'; import { IconFileExport, IconMoon, IconSun } from '@tabler/icons-react'; import { FC } from 'react'; import { useTranslation } from 'next-i18next'; import { ClearConversations } from './ClearConversations'; import { Import } from './Import'; import { Key } from './Key'; import { SidebarButton } from './SidebarButton'; interface Props { lightMode: 'light' | 'dark'; apiKey: string; onToggleLightMode: (mode: 'light' | 'dark') => void; onApiKeyChange: (apiKey: string) => void; onClearConversations: () => void; onExportConversations: () => void; onImportConversations: (data: { conversations: Conversation[]; folders: ChatFolder[]; }) => void; } export const SidebarSettings: FC = ({ lightMode, apiKey, onToggleLightMode, onApiKeyChange, onClearConversations, onExportConversations, onImportConversations, }) => { const { t } = useTranslation('sidebar'); return (
} onClick={() => onExportConversations()} /> : } onClick={() => onToggleLightMode(lightMode === 'light' ? 'dark' : 'light') } />
); };