package reserveacutil

import "strings"

const (
	StatusPending    = "pending"
	StatusApproved   = "approved"
	StatusOnProgress = "onprogress"
)

func NormalizeStatus(v string) string {
	switch strings.ToLower(strings.TrimSpace(v)) {
	case StatusApproved:
		return StatusApproved
	case StatusOnProgress:
		return StatusOnProgress
	default:
		return StatusPending
	}
}

func IsValidStatus(v string) bool {
	switch strings.ToLower(strings.TrimSpace(v)) {
	case StatusPending, StatusApproved, StatusOnProgress:
		return true
	default:
		return false
	}
}

func AllowedStatusText() string {
	return "pending, approved, onprogress"
}
