import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:niogu_ecommerce_v1/core/constant/app_color.dart';
import 'package:niogu_ecommerce_v1/core/constant/app_font_size.dart';
import 'package:niogu_ecommerce_v1/core/router/app_route.dart';
import 'package:sizer/sizer.dart';

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

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      top: false,
      bottom: true,
      right: false,
      left: false,
      child: Scaffold(
        backgroundColor: Colors.white,
        body: Padding(
          padding: EdgeInsets.symmetric(horizontal: 10.w),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Container(
                width: 50.w,
                height: 50.w,
                decoration: BoxDecoration(
                  color: AppColor.primaryColor.withOpacity(0.05),
                  shape: BoxShape.circle,
                ),
                child: Stack(
                  alignment: Alignment.center,
                  children: [
                    Icon(
                      Icons.account_circle_outlined,
                      size: 30.w,
                      color: AppColor.primaryColor.withOpacity(0.2),
                    ),
                    Positioned(
                      bottom: 12.w,
                      right: 12.w,
                      child: CircleAvatar(
                        radius: 5.w,
                        backgroundColor: AppColor.primaryColor,
                        child: Icon(
                          Icons.login_rounded,
                          color: Colors.white,
                          size: 5.w,
                        ),
                      ),
                    ),
                  ],
                ),
              ),

              SizedBox(height: 5.h),

              Text(
                "Yuk, Masuk ke Akunmu!",
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: AppFontSize.medium.sp,
                  fontWeight: FontWeight.bold,
                  color: Colors.black87,
                ),
              ),
              SizedBox(height: 1.5.h),
              Text(
                "Masuk untuk melihat riwayat pesanan, mengelola alamat, dan menikmati kemudahan belanja",
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: (AppFontSize.small - 1).sp,
                  color: Colors.grey.shade600,
                  height: 1.5,
                ),
              ),

              SizedBox(height: 6.h),

              SizedBox(
                width: double.infinity,
                child: ElevatedButton(
                  onPressed: () => context.pushNamed(AppRoute.loginScreen),
                  style: ElevatedButton.styleFrom(
                    backgroundColor: AppColor.primaryColor,
                    padding: EdgeInsets.symmetric(vertical: 2.h),
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(3.w),
                    ),
                    elevation: 0,
                  ),
                  child: Text(
                    "Masuk Akun",
                    style: TextStyle(
                      fontSize: AppFontSize.medium.sp,
                      fontWeight: FontWeight.bold,
                      color: Colors.white,
                    ),
                  ),
                ),
              ),

              SizedBox(height: 2.h),

              SizedBox(
                width: double.infinity,
                child: OutlinedButton(
                  onPressed: () => context.pushNamed(AppRoute.registerScreen),
                  style: OutlinedButton.styleFrom(
                    padding: EdgeInsets.symmetric(vertical: 2.h),
                    side: const BorderSide(color: AppColor.primaryColor),
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(3.w),
                    ),
                  ),
                  child: Text(
                    "Daftar Sekarang",
                    style: TextStyle(
                      fontSize: AppFontSize.medium.sp,
                      fontWeight: FontWeight.bold,
                      color: AppColor.primaryColor,
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
