import 'package:get/get.dart';

import '../../../core/constants/app_assets.dart';
import '../../../core/constants/translation_keys.dart';
import '../../../routes/app_pages.dart';
import '../../bill_management/views/bill_management_view.dart';
import '../../login/views/shared/bottom_sheet_login.dart';


class BillManagementCategoryController extends GetxController {
  List<BottomSheetLogin> getOptions(BillType? selectedBillType) {
    switch (selectedBillType) {
      case BillType.electricity:
        return optionsElectricity;
      case BillType.gas:
        return optionsGas;
      case BillType.internet:
        return optionsInternet;
      case BillType.water:
        return optionsWater;
      default:
        return [];
    }
  }

  String getBillTypeCategory(BillType? billType) {
    switch (billType) {
      case BillType.electricity:
        return TranslationKeys.makeTranslation(TranslationKeys.transUtilityElectricity);
      case BillType.gas:
        return TranslationKeys.makeTranslation(TranslationKeys.transUtilityGas);
      case BillType.internet:
        return TranslationKeys.makeTranslation(TranslationKeys.transUtilityInternet);
      case BillType.water:
        return TranslationKeys.makeTranslation(TranslationKeys.transUtilityWater);
      default:
        return '';
    }
  }

  /// Helper function to get category based on bill type
  String getBillTypeCategoryS(BillType? billType) {
    switch (billType) {
      case BillType.electricity:
        return 'Electricity Bill';
      case BillType.gas:
        return 'Gas Bill';
      case BillType.internet:
        return 'Internet Bill';
      case BillType.water:
        return 'Water Bill';
      default:
        return 'Unknown';
    }
  }

  List<BottomSheetLogin> optionsElectricity = [
    BottomSheetLogin(
        billTypes: "${BillType.utilityAJKBARKIYAT}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityAJKBARKIYAT),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(
            Routes.UTILITY_BILLS_SELECTED_CATEGORY,
            arguments: {
              "billTypes": "${BillType.utilityAJKBARKIYAT}",
              "description": TranslationKeys.makeTranslation(
                  TranslationKeys.transUtilityAJKBARKIYAT),
              "icon": AppAssets.ic_government,
            },
          );
        }),
    BottomSheetLogin(
        billTypes: "${BillType.utilityFESCO}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityFESCO),
        icon: AppAssets.ic_multan,
        onTap: () {
          Get.toNamed(
            Routes.UTILITY_BILLS_SELECTED_CATEGORY,
            arguments: {
              "billTypes": "${BillType.utilityFESCO}",
              "description": TranslationKeys.makeTranslation(
                  TranslationKeys.transUtilityFESCO),
              "icon": AppAssets.ic_multan,
            },
          );
        }),
    BottomSheetLogin(
        billTypes: "${BillType.utilityGBBARKIYAT}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityGBBARKIYAT),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(
            Routes.UTILITY_BILLS_SELECTED_CATEGORY,
            arguments: {
              "billTypes": "${BillType.utilityGBBARKIYAT}",
              "description": TranslationKeys.makeTranslation(
                  TranslationKeys.transUtilityGBBARKIYAT),
              "icon": AppAssets.ic_government,
            },
          );
        }),
    BottomSheetLogin(
        billTypes: "${BillType.utilityIESCO}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityGEPCO),
        icon: AppAssets.ic_khan,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.utilityIESCO}",
            "description": TranslationKeys.makeTranslation(
                TranslationKeys.transUtilityGEPCO),
            "icon": AppAssets.ic_khan,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.utilityGEPCO}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityHESCO),
        icon: AppAssets.ic_ke,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.utilityGEPCO}",
            "description": TranslationKeys.makeTranslation(
                TranslationKeys.transUtilityHESCO),
            "icon": AppAssets.ic_ke,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.utilityHESCO}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transUtilityIESCO),
        icon: AppAssets.ic_kc,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.utilityHESCO}",
            "description": TranslationKeys.makeTranslation(
                TranslationKeys.transUtilityIESCO),
            "icon": AppAssets.ic_kc,
          });
        }),
  ];

  List<BottomSheetLogin> optionsGas = [
    BottomSheetLogin(
        billTypes: "${BillType.pakGasAgency}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transPakGasAgency),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(
            Routes.UTILITY_BILLS_SELECTED_CATEGORY,
            arguments: {
              "billTypes": "${BillType.pakGasAgency}",
              "description": TranslationKeys.makeTranslation(
                  TranslationKeys.transPakGasAgency),
              "icon": AppAssets.ic_government,
            },
          );
        }),
    BottomSheetLogin(
        billTypes: "${BillType.suitGas}",
        description: TranslationKeys.makeTranslation("Sui Gas"),
        icon: AppAssets.ic_gas,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.suitGas}",
            "description": TranslationKeys.makeTranslation("Sui Gas"),
            "icon": AppAssets.ic_sui_gas,
          });
        }),
  ];

  List<BottomSheetLogin> optionsInternet = [
    BottomSheetLogin(
        billTypes: "${BillType.fiber}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transFiber),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.fiber}",
            "description":
                TranslationKeys.makeTranslation(TranslationKeys.transFiber),
            "icon": AppAssets.ic_government,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.zong}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transZong),
        icon: AppAssets.ic_multan,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.zong}",
            "description":
                TranslationKeys.makeTranslation(TranslationKeys.transZong),
            "icon": AppAssets.ic_multan,
          });
        }),
  ];

  List<BottomSheetLogin> optionsWater = [
    BottomSheetLogin(
        billTypes: "${BillType.nestle}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transNestle),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.nestle}",
            "description":
                TranslationKeys.makeTranslation(TranslationKeys.transNestle),
            "icon": AppAssets.ic_government,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.aqua}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transAquaFujitenma),
        icon: AppAssets.ic_multan,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.aqua}",
            "description": TranslationKeys.makeTranslation(
                TranslationKeys.transAquaFujitenma),
            "icon": AppAssets.ic_multan,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.pepsiCo}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transPepsiCo),
        icon: AppAssets.ic_government,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.pepsiCo}",
            "description":
                TranslationKeys.makeTranslation(TranslationKeys.transPepsiCo),
            "icon": AppAssets.ic_government,
          });
        }),
    BottomSheetLogin(
        billTypes: "${BillType.minerva}",
        description: TranslationKeys.makeTranslation(TranslationKeys.transMinerva),
        icon: AppAssets.ic_khan,
        onTap: () {
          Get.toNamed(Routes.UTILITY_BILLS_SELECTED_CATEGORY, arguments: {
            "billTypes": "${BillType.minerva}",
            "description":
                TranslationKeys.makeTranslation(TranslationKeys.transMinerva),
            "icon": AppAssets.ic_khan,
          });
        }),
  ];
}
