import React, { useState } from 'react'; import { View, Text, StyleSheet, TextInput, KeyboardAvoidingView, Platform, Alert, TouchableOpacity, Pressable, useWindowDimensions } from 'react-native'; import { router } from 'expo-router'; import Animated, { FadeInDown, FadeInUp } from 'react-native-reanimated'; import { COLORS, SPACING, TYPOGRAPHY, BORDER_RADIUS, SHADOWS } from '../../constants/theme'; import { useLanguage } from '../../stores/LanguageContext'; import { Button } from '../../components/ui/Button'; import { Card } from '../../components/ui/Card'; import { Mail, Lock, Scissors, ChevronLeft } from 'lucide-react-native'; import * as Haptics from 'expo-haptics'; export default function AdminLogin() { const { t } = useLanguage(); const { width } = useWindowDimensions(); const isMobile = width < 768; const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); const handleLogin = async () => { if (!email || !password) { if (Platform.OS === 'web') { window.alert(t('admin.login.error') || 'Preencha seu e-mail e senha'); } else { Alert.alert('Erro', t('admin.login.error') || 'Preencha seu e-mail e senha'); } return; } setIsLoading(true); Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium); setTimeout(() => { setIsLoading(false); router.replace('/admin/dashboard'); }, 1200); }; return ( router.back()} > {t('admin.config.back')} BarberFlow {t('admin.welcome')} {t('admin.email')} {t('admin.password')} { router.push('/admin/forgot-password'); }} style={styles.forgotPassword} > Esqueceu a senha?