import 'package:pshared/data/dto/payment/quote_amounts.dart';
import 'package:pshared/data/mapper/money.dart';
import 'package:pshared/models/payment/quote/amounts.dart';

extension QuoteAmountsDTOMapper on QuoteAmountsDTO {
  QuoteAmounts toDomain() => QuoteAmounts(
    sourcePrincipal: sourcePrincipal?.toDomain(),
    sourceDebitTotal: sourceDebitTotal?.toDomain(),
    destinationSettlement: destinationSettlement?.toDomain(),
  );
}

extension QuoteAmountsMapper on QuoteAmounts {
  QuoteAmountsDTO toDTO() => QuoteAmountsDTO(
    sourcePrincipal: sourcePrincipal?.toDTO(),
    sourceDebitTotal: sourceDebitTotal?.toDTO(),
    destinationSettlement: destinationSettlement?.toDTO(),
  );
}
