import { useTranslation } from "react-i18next"; import { useApiUrl } from "@/hooks/use-api-url"; import { useDataManagement } from "@/hooks/use-data-management"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { LanguageSwitcher } from "@/components/language-switcher"; import { Settings as SettingsIcon, RotateCcw, Save, Download, Upload } from "lucide-react"; export default function SettingsPage() { const { t } = useTranslation(); const { apiUrl, setApiUrl, currentApiUrl, saveApiUrl, resetApiUrl } = useApiUrl(); const { fileInputRef, exportData, importData, triggerImport } = useDataManagement(); return (

{t("Settings")}

{/* API Configuration */} {t("API Configuration")} {t("Configure the backend API URL for this application")}
{currentApiUrl}
setApiUrl(e.target.value)} className="font-mono" />

{t("Leave empty to use the default or Docker-injected URL")}

{/* Language Settings */} {t("Language")} {t("Choose your preferred language")} {/* Data Management */} {t("Data Management")} {t("Export your notes for backup or import from a JSON file.")}
); }