import 'package:flutter/material.dart';

import 'package:pshared/models/payment/settlement_mode.dart';


class PaymentAmountProvider with ChangeNotifier {
  double? _amount;
  bool _payerCoversFee = true;
  SettlementMode _settlementMode = SettlementMode.fixSource;
  String _comment = '';

  double? get amount => _amount;
  bool get payerCoversFee => _payerCoversFee;
  SettlementMode get settlementMode => _settlementMode;
  String get comment => _comment;

  void setAmount(double? value) {
    if (_amount == value) return;
    _amount = value;
    notifyListeners();
  }

  void setPayerCoversFee(bool value) {
    _payerCoversFee = value;
    notifyListeners();
  }

  void setSettlementMode(SettlementMode value) {
    if (_settlementMode == value) return;
    _settlementMode = value;
    notifyListeners();
  }

  void setComment(String value) {
    if (_comment == value) return;
    _comment = value;
    notifyListeners();
  }
}
