import 'package:car_provider_app/classes/colors.dart';
import 'package:car_provider_app/config/routes.dart';
import 'package:car_provider_app/generated/locale_keys.g.dart';
import 'package:car_provider_app/utils/navigator.dart';
import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/widgets/app_bar.dart';
import 'package:car_provider_app/widgets/button/show_fill_button.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class RegisterSelectionPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // appBar: appBar(title: LocaleKeys.login.tr()),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        decoration: BoxDecoration(
          image: DecorationImage(
            image: AssetImage("assets/images/bn_Intro.png"),
            fit: BoxFit.cover,
          ),
        ),
        child: Column(
          children: [
            mFlex(6),
            SvgPicture.asset("assets/images/logo.svg"),
            mFlex(4),
            LocaleKeys.welcomeMessage.tr().toText20(),
            LocaleKeys.welcomeDes.tr().toText14(color: MyColors.lightTextColor),
            mFlex(1),
            ShowFillButton(
              title: LocaleKeys.login.tr(),
              maxWidth: double.infinity,
              horizontalMargin: 20,
              onPressed: () {
                navigateWithName(context, AppRoutes.loginWithPassword);
              },
            ),
            20.height,
            ShowFillButton(
              title: LocaleKeys.signUp.tr(),
              maxWidth: double.infinity,
              isFlatButton: true,
              txtColor: Colors.black,
              onPressed: () {
                navigateWithName(context, AppRoutes.register);
              },
            ),
            10.height,
            // ShowFillButton(
            //   title: LocaleKeys.forgetPassword.tr(),
            //   maxWidth: double.infinity,
            //   isFlatButton: true,
            //   isBold: false,
            //   txtColor: MyColors.darkPrimaryColor,
            //   onPressed: () {
            //     navigateWithName(context, AppRoutes.forgetPassword);
            //   },
            // ),
            mFlex(3),
            TextButton(
              onPressed: () {},
              child: const Text(
                "Continue as Guest",
                style: TextStyle(
                  color: MyColors.darkPrimaryColor,
                  fontWeight: FontWeight.bold,
                  decoration: TextDecoration.underline,
                ),
              ),
            ),
            mFlex(3),
          ],
        ),
      ),
    );
  }
}
