"use client"; import { useTranslations } from 'next-intl'; import { useSettingsStore, ALL_DEBUG_CATEGORIES } from '@/stores/settings-store'; import { SettingsSection, SettingItem, ToggleSwitch } from './settings-section'; import { usePolicyStore } from '@/stores/policy-store'; export function DebugSettings() { const t = useTranslations('settings.advanced'); const { debugMode, debugCategories, updateSetting } = useSettingsStore(); const { isSettingLocked, isSettingHidden, isFeatureEnabled } = usePolicyStore(); if (isSettingHidden('debugMode') || !isFeatureEnabled('debugModeEnabled')) { return (

{t('debug_mode.description')}

); } return ( updateSetting('debugMode', checked)} /> {debugMode && (

{t('debug_categories.description')}

{ALL_DEBUG_CATEGORIES.map((cat) => ( { updateSetting('debugCategories', { ...debugCategories, [cat.id]: checked, }); }} /> ))}
)}
); }