marmar-context / web / context / src / clinician / charts / tiers.ts
tiers.ts
Raw
import type { Tier } from "../../api/types";
import type { IconName, Tone } from "../kit";

/** One look per tier for the findings mix and the finding cards; the words stay in logic/format. */
export const tierLook: Record<Tier, { tone: Tone; icon: IconName; bar: string }> = {
  get_help_now: { tone: "red", icon: "alarm-warning-fill", bar: "bg-red-text" },
  today: { tone: "red", icon: "error-warning-fill", bar: "bg-red-icon" },
  this_week: { tone: "amber", icon: "time-fill", bar: "bg-amber-icon" },
  good_to_know: { tone: "grey", icon: "information-fill", bar: "bg-line-strong" },
};

export const lookOf = (tier: string) => tierLook[tier as Tier] ?? tierLook.good_to_know;