import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.dart';

class NewPasswordScreen extends StatefulWidget {
  NewPasswordScreen({Key? key}) : super(key: key);

  @override
  _NewPasswordScreenState createState() {
    return _NewPasswordScreenState();
  }
}

class _NewPasswordScreenState extends State<NewPasswordScreen> {
  TextEditingController password = TextEditingController();
  TextEditingController confirmPassword = TextEditingController();

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.transparent,
        leading: IconButton(
          icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
          onPressed: () => Navigator.pop(context),
        ),
      ),
      body: Column(
        children: [
          //const SizedBox(height: 23),
          Expanded(
            child: Padding(
              padding: const EdgeInsets.all(21.0),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  // Row(
                  //   children: [
                  //     Expanded(child: SizedBox()),
                  //     Row(
                  //       children: [
                  //         LocaleKeys.english.tr().toText14(color: MyColors.textMixColor).onPress(() {}),
                  //         Container(
                  //           width: 1,
                  //           color: MyColors.darkWhiteColor,
                  //           height: 16,
                  //           margin: const EdgeInsets.only(left: 10, right: 10),
                  //         ),
                  //         LocaleKeys.arabic.tr().toText14().onPress(() {}),
                  //       ],
                  //     ),
                  //   ],
                  // ),
                  Expanded(
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        LocaleKeys.setTheNewPassword.tr().toText24(isBold: true),
                        LocaleKeys.typeYourNewPasswordBelow.tr().toText16(),
                        16.height,
                        InputWidget(LocaleKeys.password.tr(), "**********", password),
                        12.height,
                        InputWidget(LocaleKeys.confirmPassword.tr(), "**********", confirmPassword, isObscureText: true)
                      ],
                    ),
                  )
                ],
              ),
            ),
          ),
          DefaultButton(LocaleKeys.update.tr(), () async {

        //    Navigator.pushNamed(context, AppRoutes.verifyLogin);
          }).insideContainer
        ],
      ),
    );
  }
}
