import type { UserRole } from "@/types";

/** Observers may view elections but must not mutate them. */
export function electionMutationBlockedReason(role: UserRole): string | null {
  if (role === "election_observer") {
    return "Observers have read-only access to elections";
  }
  return null;
}

export function isElectionObserver(role: UserRole): boolean {
  return role === "election_observer";
}
