package validate

import (
	"strings"

	"gitea.maximumdirect.net/eric/notarius/internal/framework/contracts"
)

const (
	ReasonApproved = "approved"
)

func Approved() contracts.ValidationResult {
	return contracts.ValidationResult{
		Approved:   true,
		ReasonCode: ReasonApproved,
		Message:    ReasonApproved,
	}
}

func Rejected(reasonCode string, message string) contracts.ValidationResult {
	return contracts.ValidationResult{
		Approved:   false,
		ReasonCode: strings.TrimSpace(reasonCode),
		Message:    strings.TrimSpace(message),
	}
}
