// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.11.1.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

DartZakatResult calculateBusinessZakat({
  required double cash,
  required double inventory,
  required double receivables,
  required double liabilities,
  required double goldPrice,
  required double silverPrice,
}) => RustLib.instance.api.crateApiSimpleCalculateBusinessZakat(
  cash: cash,
  inventory: inventory,
  receivables: receivables,
  liabilities: liabilities,
  goldPrice: goldPrice,
  silverPrice: silverPrice,
);

DartZakatResult calculateSavingsZakat({
  required double cashInHand,
  required double bankBalance,
  required double goldPrice,
  required double silverPrice,
}) => RustLib.instance.api.crateApiSimpleCalculateSavingsZakat(
  cashInHand: cashInHand,
  bankBalance: bankBalance,
  goldPrice: goldPrice,
  silverPrice: silverPrice,
);

(double, double) getNisabThresholds({
  required double goldPrice,
  required double silverPrice,
}) => RustLib.instance.api.crateApiSimpleGetNisabThresholds(
  goldPrice: goldPrice,
  silverPrice: silverPrice,
);

class DartZakatResult {
  final double zakatDue;
  final bool isPayable;
  final double nisabThreshold;
  final double wealthAmount;
  final String limitName;

  const DartZakatResult({
    required this.zakatDue,
    required this.isPayable,
    required this.nisabThreshold,
    required this.wealthAmount,
    required this.limitName,
  });

  @override
  int get hashCode =>
      zakatDue.hashCode ^
      isPayable.hashCode ^
      nisabThreshold.hashCode ^
      wealthAmount.hashCode ^
      limitName.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is DartZakatResult &&
          runtimeType == other.runtimeType &&
          zakatDue == other.zakatDue &&
          isPayable == other.isPayable &&
          nisabThreshold == other.nisabThreshold &&
          wealthAmount == other.wealthAmount &&
          limitName == other.limitName;
}
