import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:web_panel/utils/App_color.dart';
import 'package:web_panel/utils/spacing.dart';

import '../../constants.dart';
import '../../responsive.dart';
import 'login_fields.dart';

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

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        backgroundColor: AppColor.bgColor,
        body: Responsive.isMobile(context)
            ? SingleChildScrollView(
              child: SizedBox(
                height: MediaQuery.of(context).size.height,
                child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      Image.asset(
                        'assets/animation/login.gif',
                        height: 150.sp,
                        width: 350.sp,
                      ),
                      Spacing.height(15),
                      LoginFields(),
                    ],
                  ),
              ),
            )
            : Row(
                children: [
                  Expanded(child: LoginFields()),
                  Expanded(child: Image.asset('assets/animation/login.gif')),
                ],
              ),
      ),
    );
  }
}
