package fees

import (
	"github.com/tech/sendico/billing/fees/storage/model"
	feesv1 "github.com/tech/sendico/pkg/proto/billing/fees/v1"
)

func convertTrigger(trigger feesv1.Trigger) model.Trigger {
	switch trigger {
	case feesv1.Trigger_TRIGGER_UNSPECIFIED:
		return model.TriggerUnspecified
	case feesv1.Trigger_TRIGGER_CAPTURE:
		return model.TriggerCapture
	case feesv1.Trigger_TRIGGER_REFUND:
		return model.TriggerRefund
	case feesv1.Trigger_TRIGGER_DISPUTE:
		return model.TriggerDispute
	case feesv1.Trigger_TRIGGER_PAYOUT:
		return model.TriggerPayout
	case feesv1.Trigger_TRIGGER_FX_CONVERSION:
		return model.TriggerFXConversion
	default:
		return model.TriggerUnspecified
	}
}
