import React, { useState } from 'react'; import { View, Text, StyleSheet, TextInput, Pressable, KeyboardAvoidingView, Platform, Alert, Image, ScrollView } 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 { Button } from '../../../components/ui/Button'; import { Mail, Lock, Scissors, User, Phone, ChevronLeft } from 'lucide-react-native'; import * as Haptics from 'expo-haptics'; import { useLanguage } from '../../../stores/LanguageContext'; import { useBarbearia } from '../../../stores/BarbeariaContext'; import { SafeAreaView } from 'react-native-safe-area-context'; export default function RegisterScreen() { const { t } = useLanguage(); const { barbearia } = useBarbearia(); const colors = barbearia?.colors || COLORS; const [name, setName] = useState(''); const [email, setEmail] = useState(''); const [phone, setPhone] = useState(''); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); const handleRegister = async () => { if (!name || !email || !password || !phone) { if (Platform.OS === 'web') { window.alert(t('admin.config.fill_all') || 'Preencha todos os campos'); } else { Alert.alert('Erro', t('admin.config.fill_all') || 'Preencha todos os campos'); } return; } setIsLoading(true); Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium); // Simulação de cadastro setTimeout(() => { setIsLoading(false); router.replace(`/${barbearia?.slug}/(auth)/login`); }, 1500); }; return ( router.back()} > {t('book.back') || 'Voltar'} {barbearia?.logo ? ( ) : ( )} Criar Conta Cadastre-se para agendar seu horário.