"use client"; import { useState } from 'react'; import { useTranslations } from 'next-intl'; import { useSettingsStore } from '@/stores/settings-store'; import { SettingsSection, SettingItem, Select, ToggleSwitch } from './settings-section'; import { TrustedSendersModal } from '@/components/trusted-senders-modal'; import { ChevronRight } from 'lucide-react'; import { usePolicyStore } from '@/stores/policy-store'; import { useContactStore } from '@/stores/contact-store'; export function ContentSendersSettings() { const t = useTranslations('settings.email_behavior'); const [showTrustedModal, setShowTrustedModal] = useState(false); const { isSettingLocked, isSettingHidden } = usePolicyStore(); const { externalContentPolicy, emailAlwaysLightMode, trustedSenders, trustedSendersAddressBook, updateSetting, } = useSettingsStore(); const { trustedSenderEmails } = useContactStore(); const getTrustedSendersCount = () => { const count = trustedSendersAddressBook ? trustedSenderEmails.length : trustedSenders.length; if (count === 0) return t('trusted_senders.count_zero'); if (count === 1) return t('trusted_senders.count_one'); return t('trusted_senders.count_other', { count }); }; return ( {!isSettingHidden('externalContentPolicy') && (