import { Link, Stack } from 'expo-router';
import { StyleSheet, Text, View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { useAppearance } from '@/src/context/AppearanceContext';

export default function NotFoundScreen() {
  const { t } = useTranslation();
  const { colors } = useAppearance();

  return (
    <>
      <Stack.Screen options={{ title: t('notFound.title') }} />
      <View style={[styles.container, { backgroundColor: colors.background }]}>
        <Text style={[styles.title, { color: colors.text }]}>{t('notFound.title')}</Text>
        <Text style={[styles.description, { color: colors.textMuted }]}>
          {t('notFound.description')}
        </Text>
        <Link href="/" style={[styles.link, { color: colors.brand }]}>
          {t('notFound.backToDashboard')}
        </Link>
      </View>
    </>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    padding: 20,
    gap: 12,
  },
  title: {
    fontSize: 22,
    fontWeight: '700',
  },
  description: {
    fontSize: 15,
    textAlign: 'center',
  },
  link: {
    marginTop: 8,
    fontSize: 16,
    fontWeight: '600',
  },
});
