import 'package:pshared/models/payment/fees/treatment.dart';


FeeTreatment feeTreatmentFromValue(String? value) {
  switch (value) {
    case 'add_to_source':
      return FeeTreatment.addToSource;
    case 'deduct_from_destination':
      return FeeTreatment.deductFromDestination;
    case 'unspecified':
      return FeeTreatment.unspecified;
    default:
      throw ArgumentError('Unknown FeeTreatment value: $value');
  }
}

String feeTreatmentToValue(FeeTreatment value) {
  switch (value) {
    case FeeTreatment.addToSource:
      return 'add_to_source';
    case FeeTreatment.deductFromDestination:
      return 'deduct_from_destination';
    case FeeTreatment.unspecified:
      return 'unspecified';
  }
}