import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gap/gap.dart';
import 'package:google_fonts/google_fonts.dart';

import '../../../../core/routes/routes.dart';
import '../../../../core/styles/app_text.dart';
import '../../../../core/utils/language/localizations_delegate.dart';
import '../../../../shared/components/form_label_textfield.dart';

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

  @override
  Widget build(BuildContext context) {
    TextEditingController accountNameText = TextEditingController();
    TextEditingController accountNoText = TextEditingController();
    TextEditingController ibanText = TextEditingController();
    TextEditingController swiftCodeText = TextEditingController();
    TextEditingController bankNameText = TextEditingController();
    TextEditingController bankAddressText = TextEditingController();
    var localizations = AppLocalizations.of(context);
    return Scaffold(
      backgroundColor: Colors.white,
      bottomNavigationBar: Padding(
        padding: MediaQuery.of(context).viewInsets,
        child: GestureDetector(
          onTap: () {
            goRouter.pop();
          },
          child: Container(
            margin: const EdgeInsets.all(10.0),
            height: 65.h,
            width: double.infinity,
            decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(22.r),
              color: const Color(0xFF004717),
            ),
            child: Center(
              child: Text(
                localizations.translate(AppText.submitText),
                style: GoogleFonts.dmSans(
                  color: Colors.white,
                  fontSize: 14.sp,
                  fontWeight: FontWeight.w700,
                ),
              ),
            ),
          ),
        ),
      ),
      appBar: AppBar(
        backgroundColor: Colors.white,
        elevation: 0,
        scrolledUnderElevation: 0.0,
        centerTitle: true,
        title: Text(
          localizations.translate(AppText.addBankDetails),
          style: GoogleFonts.dmSans(
            color: const Color(0xFF272727),
            fontSize: 20.sp,
            fontWeight: FontWeight.w700,
          ),
        ),
      ),
      body: Padding(
        padding: const EdgeInsets.all(12.0),
        child: SingleChildScrollView(
          child: Column(
            children: [
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.accountName),
                title: localizations.translate(AppText.accountName),
                type: "first name",
                textEditingController: accountNameText,
              ),
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.accountNo),
                title: localizations.translate(AppText.accountNo),
                type: "first name",
                textEditingController: accountNoText,
              ),
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.iban),
                title: localizations.translate(AppText.iban),
                type: "first name",
                textEditingController: ibanText,
              ),
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.swiftCode),
                title: localizations.translate(AppText.swiftCode),
                type: "first name",
                textEditingController: swiftCodeText,
              ),
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.bankName),
                title: localizations.translate(AppText.bankName),
                type: "first name",
                textEditingController: bankNameText,
              ),
              const Gap(20),
              FormLabelTextField(
                hintText: localizations.translate(AppText.bankAddress),
                title: localizations.translate(AppText.bankAddress),
                type: "first name",
                textEditingController: bankAddressText,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
