import React from 'react'; import { Page } from './_util'; import { useTranslation } from '../i18n/useTranslation'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Switch } from '@/components/ui/switch'; import { useHapticsPreference } from '../hooks/useHapticsPreference'; import { triggerHaptic } from '../lib/haptics'; export default function SettingsPage() { const { t } = useTranslation(); const { enabled: hapticsEnabled, setEnabled: setHapticsEnabled, supported: hapticsSupported } = useHapticsPreference(); return (

{t('settings.subtitle')}

{t('settings.haptics.title')} {t('settings.haptics.description')}
{t('settings.haptics.label')} { setHapticsEnabled(checked); if (checked) { triggerHaptic('selection'); } }} disabled={!hapticsSupported} aria-label={t('settings.haptics.label')} />
{!hapticsSupported && (
{t('settings.haptics.unsupported')}
)}
); }