'use client'; import React from 'react'; import { X, Download, Save, Trash2, Mic, Settings } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import { toast } from 'sonner'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Switch } from '@/components/ui/switch'; import { Slider } from '@/components/ui/slider'; interface SettingsModalProps { isOpen: boolean; onClose: () => void; autoAdvance: boolean; setAutoAdvance: (value: boolean) => void; autoSave: boolean; setAutoSave: (value: boolean) => void; silenceThreshold: number; setSilenceThreshold: (value: number) => void; datasetName: string; } export default function SettingsModal({ isOpen, onClose, autoAdvance, setAutoAdvance, autoSave, setAutoSave, silenceThreshold, setSilenceThreshold, datasetName }: SettingsModalProps) { const handleExport = async () => { try { // Trigger download by navigating to the API endpoint window.location.href = `/api/export-dataset?dataset_name=${datasetName}`; toast.success('Export started'); } catch (error) { console.error(error); toast.error('Error exporting dataset'); } }; return ( {isOpen && ( <> Settings

Go to next sentence after saving

Save automatically when recording stops

{silenceThreshold}%
setSilenceThreshold(vals[0])} max={100} step={1} />

Data Management

)}
); }