package user

// ValidationService defines validation methods for user operations
type ValidationService interface {
	IsValidRole(role UserRole) bool
	IsValidStatus(status UserStatus) bool
}

// validationService implements the ValidationService interface
type validationService struct{}

// NewValidationService creates a new validation service
func NewValidationService() ValidationService {
	return &validationService{}
}

// IsValidRole checks if a user role is valid
func (v *validationService) IsValidRole(role UserRole) bool {
	switch role {
	case UserRoleAdmin, UserRoleManager, UserRoleOperator, UserRoleViewer:
		return true
	default:
		return false
	}
}

// IsValidStatus checks if a user status is valid
func (v *validationService) IsValidStatus(status UserStatus) bool {
	switch status {
	case UserStatusActive, UserStatusInactive, UserStatusSuspended:
		return true
	default:
		return false
	}
}
