import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/core/styles/app_images.dart';
import 'package:tanami_app/core/styles/app_text.dart';
import 'package:tanami_app/shared/components/text_widget.dart';

import '../../../../../core/routes/route_name.dart';
import '../../../../../core/routes/routes.dart';
import '../../../../../core/utils/language/localizations_delegate.dart';
import 'settings_list_tile_item.dart';

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

  @override
  Widget build(BuildContext context) {
    var localizations = AppLocalizations.of(context);
    return Padding(
      padding: const EdgeInsets.symmetric(
        horizontal: 16,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          TextWidget().text14W600(
            localizations.translate(AppText.privacySettingsText),
            clr: AppColor.hintTextColor,
          ),
          const Gap(5),
          SettingsListItem(
            onTapFunc: () {
              goRouter.pushNamed(
                RouteName.changePasswordScreen,
              );
            },
            icon: AppImages.resetPasswordIcon,
            title: localizations.translate(AppText.resetPasswordText),
            trailing: "",
          ),
          const Gap(8),
          SettingsListItem(
            onTapFunc: () {
              goRouter.pushNamed(RouteName.pinScreen, pathParameters: {
                "fromScreen": "reset-pin",
              });
            },
            icon: AppImages.resetPinIcon,
            title: localizations.translate(AppText.resetPinCodeText),
            trailing: "",
          ),
          const Gap(10),
          const Divider(
            color: AppColor.academyCardTextColor,
          ),
        ],
      ),
    );
  }
}
