"use client"; import { useTranslations } from 'next-intl'; import { useSettingsStore } from '@/stores/settings-store'; import { SettingsSection, SettingItem, Select, ToggleSwitch } from './settings-section'; export function EmailSettings() { const t = useTranslations('settings.email_behavior'); const { markAsReadDelay, deleteAction, showPreview, emailsPerPage, externalContentPolicy, updateSetting, } = useSettingsStore(); return ( {/* Mark as Read */} updateSetting('deleteAction', value as 'trash' | 'permanent')} options={[ { value: 'trash', label: t('delete_action.trash') }, { value: 'permanent', label: t('delete_action.permanent') }, ]} /> {/* Show Preview */} updateSetting('showPreview', checked)} /> {/* Emails Per Page */} updateSetting('externalContentPolicy', value as 'ask' | 'block' | 'allow') } options={[ { value: 'ask', label: t('external_content.ask') }, { value: 'block', label: t('external_content.block') }, { value: 'allow', label: t('external_content.allow') }, ]} /> ); }