package quote_computation_service

import (
	"github.com/tech/sendico/payments/storage/model"
	payecon "github.com/tech/sendico/pkg/payments/economics"
	paymentv1 "github.com/tech/sendico/pkg/proto/common/payment/v1"
	quotationv2 "github.com/tech/sendico/pkg/proto/payments/quotation/v2"
)

func resolvedSettlementModeFromModel(mode model.SettlementMode) paymentv1.SettlementMode {
	switch mode {
	case model.SettlementModeFixSource:
		return paymentv1.SettlementMode_SETTLEMENT_FIX_SOURCE
	case model.SettlementModeFixReceived:
		return paymentv1.SettlementMode_SETTLEMENT_FIX_RECEIVED
	default:
		return paymentv1.SettlementMode_SETTLEMENT_FIX_SOURCE
	}
}

func defaultResolvedFeeTreatment() quotationv2.FeeTreatment {
	return payecon.DefaultFeeTreatment()
}
