import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {type NativeStackScreenProps} from '@react-navigation/native-stack' import {type CommonNavigatorParams} from '#/lib/routes/types' import {isNative} from '#/platform/detection' import { useHapticsDisabled, useRequireAltTextEnabled, useSetHapticsDisabled, useSetRequireAltTextEnabled, } from '#/state/preferences' import { useLargeAltBadgeEnabled, useSetLargeAltBadgeEnabled, } from '#/state/preferences/large-alt-badge' import * as SettingsList from '#/screens/Settings/components/SettingsList' import {atoms as a} from '#/alf' import * as Toggle from '#/components/forms/Toggle' import {Accessibility_Stroke2_Corner2_Rounded as AccessibilityIcon} from '#/components/icons/Accessibility' import {Haptic_Stroke2_Corner2_Rounded as HapticIcon} from '#/components/icons/Haptic' import * as Layout from '#/components/Layout' type Props = NativeStackScreenProps< CommonNavigatorParams, 'AccessibilitySettings' > export function AccessibilitySettingsScreen({}: Props) { const {_} = useLingui() const requireAltTextEnabled = useRequireAltTextEnabled() const setRequireAltTextEnabled = useSetRequireAltTextEnabled() const hapticsDisabled = useHapticsDisabled() const setHapticsDisabled = useSetHapticsDisabled() const largeAltBadgeEnabled = useLargeAltBadgeEnabled() const setLargeAltBadgeEnabled = useSetLargeAltBadgeEnabled() return ( Accessibility Alt text setRequireAltTextEnabled(value)} style={[a.w_full]}> Require alt text before posting setLargeAltBadgeEnabled(value)} style={[a.w_full]}> Display larger alt text badges {isNative && ( <> Haptics setHapticsDisabled(value)} style={[a.w_full]}> Disable haptic feedback )} ) }