import 'package:flutter/material.dart';
import 'package:mc_common_app/config/routes.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/navigator.dart';
import 'package:mc_common_app/views/setting_options/widgets/custom_setting_options_tile.dart';
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:easy_localization/easy_localization.dart';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CustomAppBar(
        title: LocaleKeys.help.tr(),
        isRemoveBackButton: false,
        isDrawerEnabled: false,
        onBackButtonTapped: () => Navigator.pop(context),
      ),
      body: Column(
        children: [
          Expanded(
            child: ListView(
              children: [
                Column(
                  children: [
                    CustomSettingOptionsTile(
                      leadingWidget: const Icon(
                        Icons.info_rounded,
                        size: 20,
                        color: MyColors.greyColor,
                      ),
                      titleText: LocaleKeys.faqs.tr(),
                      needBorderBelow: true,
                      onTap: () => navigateWithName(context, AppRoutes.settingOptionsFaqs),
                    ),
                    CustomSettingOptionsTile(
                      leadingWidget: const Icon(
                        Icons.mail,
                        size: 20,
                        color: MyColors.greyColor,
                      ),
                      titleText: LocaleKeys.contactUs.tr(),
                      needBorderBelow: true,
                      onTap: () => navigateWithName(context, AppRoutes.settingOptionsContactUs),
                    ),
                    CustomSettingOptionsTile(
                      leadingWidget: const Icon(
                        Icons.lock,
                        size: 20,
                        color: MyColors.greyColor,
                      ),
                      titleText: LocaleKeys.termPrivacy.tr(),
                      needBorderBelow: true,
                      onTap: () => navigateWithName(context, AppRoutes.settingOptionsTermsAndConditions),
                    ),
                    CustomSettingOptionsTile(
                      leadingWidget: const Icon(
                        Icons.info_rounded,
                        size: 20,
                        color: MyColors.greyColor,
                      ),
                      titleText: LocaleKeys.appInfo.tr(),
                      onTap: () => navigateWithName(context, AppRoutes.settingOptionsAppInfo),
                    ),
                  ],
                ).toContainer(width: double.infinity, isShadowEnabled: true, paddingAll: 10, margin: const EdgeInsets.fromLTRB(21, 24, 21, 0), borderRadius: 0),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
