import 'package:flutter/material.dart';
import 'package:jema_app/p_or_t.dart';
import 'package:jema_app/parentSignUp.dart';
import 'package:jema_app/teachersignup.dart';

import 'p_or_t_s.dart';

class SignInUpPage extends StatelessWidget {
  const SignInUpPage({Key? key, required this.backgroundColor})
      : super(key: key);

  final Color backgroundColor;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        color: backgroundColor,
        child: SafeArea(
          child: Center(
            child: Padding(
              padding: const EdgeInsets.all(16.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  Padding(
                    padding: const EdgeInsets.all(10.0),
                    child: Image.asset(
                      'lib/assets/signinup.png',
                      width: 290,
                      height: 460,
                    ),
                  ),
                  const SizedBox(height: 20),
                  const SizedBox(height: 20),
                  ElevatedButton(
                    onPressed: () {
                      // Navigate to the signup page (TeacherSignupPage)
                      Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => ParentTeacherSignUpPage(
                            backgroundColor: backgroundColor,
                          ),
                        ),
                      );
                    },
                    child: Container(
                      width: 200,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(10.0),
                        color: Color.fromARGB(255, 96, 188, 99),
                      ),
                      child: Center(
                        child: Padding(
                          padding: const EdgeInsets.all(10.0),
                          child: Text(
                            'Sign Up',
                            style: TextStyle(color: Colors.white),
                          ),
                        ),
                      ),
                    ),
                    style: ElevatedButton.styleFrom(
                      primary: Colors.transparent,
                      elevation: 0,
                    ),
                  ),
                  const SizedBox(height: 20),
                  ElevatedButton(
                    onPressed: () {
                      // Navigate to the sign in page (ParentTeacherPage)
                      Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => ParentTeacherPage(
                            backgroundColor: backgroundColor,
                          ),
                        ),
                      );
                    },
                    child: Container(
                      width: 200,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(10.0),
                        color: const Color.fromARGB(255, 213, 80, 236),
                      ),
                      child: Center(
                        child: Padding(
                          padding: const EdgeInsets.all(10.0),
                          child: Text(
                            'Sign In',
                            style: TextStyle(color: Colors.white),
                          ),
                        ),
                      ),
                    ),
                    style: ElevatedButton.styleFrom(
                      primary: Colors.transparent,
                      elevation: 0,
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
