// 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';

// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `fmt`

// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<DartZakatResult>>
abstract class DartZakatResult implements RustOpaqueInterface {
  bool get isPayable;

  String get limitName;

  FrbDecimal get nisabThreshold;

  FrbDecimal get wealthAmount;

  FrbDecimal get zakatDue;

  set isPayable(bool isPayable);

  set limitName(String limitName);

  set nisabThreshold(FrbDecimal nisabThreshold);

  set wealthAmount(FrbDecimal wealthAmount);

  set zakatDue(FrbDecimal zakatDue);
}

// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<FrbDecimal>>
abstract class FrbDecimal implements RustOpaqueInterface {
  static FrbDecimal fromString({required String s}) =>
      RustLib.instance.api.crateApiZakatFrbDecimalFromString(s: s);

  double toF64();

  @override
  String toString();
}

// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<ZakatManager>>
abstract class ZakatManager implements RustOpaqueInterface {
  DartZakatResult calculateBusiness({
    required FrbDecimal cash,
    required FrbDecimal inventory,
    required FrbDecimal receivables,
    required FrbDecimal liabilities,
  });

  DartZakatResult calculateSavings({
    required FrbDecimal cashInHand,
    required FrbDecimal bankBalance,
  });

  (FrbDecimal, FrbDecimal) getNisabThresholds();

  factory ZakatManager({
    required FrbDecimal goldPrice,
    required FrbDecimal silverPrice,
    required String madhab,
  }) => RustLib.instance.api.crateApiZakatZakatManagerNew(
    goldPrice: goldPrice,
    silverPrice: silverPrice,
    madhab: madhab,
  );
}
