import 'package:flutter/material.dart';
import '../screens/signup_screen.dart';
import '../screens/login_screen.dart';

class LoginPanel extends StatelessWidget {
  const LoginPanel({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      color: Color(0xFFFF7500),
      padding: EdgeInsets.fromLTRB(40, 0, 40, 40),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            '간편한 반려생활을 위한 첫걸음,\nRUP에 오신것을 환영합니다!',
            style: TextStyle(
              fontSize: 12,
              fontFamily: 'SCDream',
              fontWeight: FontWeight.w500,
              color: Colors.black,
            ),
            textAlign: TextAlign.center,
          ),
          SizedBox(height: 30),
          SizedBox(
            width: double.infinity,
            child: ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => SignupScreen()),
                );
              },
              style: ElevatedButton.styleFrom(
                backgroundColor: Colors.white,
                shape: StadiumBorder(),
                padding: EdgeInsets.all(15),
              ),
              child: Stack(
                alignment: Alignment.center,
                children: [
                  Align(
                    alignment: Alignment.center,
                    child: Text(
                      '시작하기',
                      style: TextStyle(
                        fontFamily: 'SCDream',
                        fontWeight: FontWeight.bold,
                        color: Colors.black,
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ),

          SizedBox(height: 5),
          TextButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => LoginScreen()),
              );
            },
            child: Text(
              '기존 계정으로 로그인',
              style: TextStyle(
                fontFamily: 'SCDream',
                fontWeight: FontWeight.w500,
                fontSize: 12,
                color: Colors.white,
                decoration: TextDecoration.underline,
                decorationColor: Colors.white,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
