const roleRank = {
	user: 1,
	lead: 2,
	manager: 3,
	admin: 4,
} as const;

export function hasMobileRole(
	userRole: keyof typeof roleRank,
	requiredRole: keyof typeof roleRank,
) {
	return roleRank[userRole] >= roleRank[requiredRole];
}
