import 'package:pshared/data/dto/payment/quotes.dart';
import 'package:pshared/data/mapper/payment/payment_quote.dart';
import 'package:pshared/data/mapper/payment/quote/aggregate.dart';
import 'package:pshared/models/payment/quote/quotes.dart';


extension PaymentQuotesDTOMapper on PaymentQuotesDTO {
  PaymentQuotes toDomain() => PaymentQuotes(
    quoteRef: quoteRef,
    aggregate: aggregate?.toDomain(),
    quotes: quotes?.map((quote) => quote.toDomain()).toList(),
  );
}

extension PaymentQuotesMapper on PaymentQuotes {
  PaymentQuotesDTO toDTO() => PaymentQuotesDTO(
    quoteRef: quoteRef,
    aggregate: aggregate?.toDTO(),
    quotes: quotes?.map((quote) => quote.toDTO()).toList(),
  );
}
