import { View, StyleSheet, Image, Text, Button } from "react-native";
import { LIGTHT_THEME } from "../src/constants/theme";
import { SignUpForm } from "../src/components/sign_up_form/sign_up_form";
import { router } from "expo-router";
const loginImage = require("../assets/login-image.jpg");

const SignUp = () => {
  return (
    <View style={styles.mainContainer}>
      <View style={styles.imageContainer}>
        <Image
          source={loginImage}
          style={{ width: "100%", height: "100%" }}
          resizeMode="cover"
        />
      </View>
      <View style={styles.loginContainer}>
        <SignUpForm />
        <Button title="Login" onPress={() => router.replace('/login')}/>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  mainContainer: {
    flex: 1,
    backgroundColor: LIGTHT_THEME.color.background,
  },
  imageContainer: {
    height: "40%",
    overflow: "hidden",
    borderBottomLeftRadius: 70,
    elevation: 5,
  },
  loginContainer: {
    marginHorizontal: 20,
    marginTop: "-30%",
    marginBottom: 20,
    elevation: 5,
    borderRadius: 10,
    backgroundColor: LIGTHT_THEME.color.white,
    height: "70%",
  },
  loginScroll: {
    padding: 20,
    gap: 10,
    justifyContent: "center",
  },
  title: { fontSize: 30, fontWeight: "bold", alignSelf: "center" },
  submitBtn: {
    backgroundColor: "black",
    borderRadius: 5,
    width: "100%",
    padding: 10,
    justifyContent: "center",
    alignItems: "center",
  },
  submitBtnText: {
    color: "white",
    fontSize: 20,
  }
});
export default SignUp;
