eletrotupi / tcc/ frontend/constants/trigger-categories.ts7c779e23b4945ae724e7a21d58f8f30d34ab10b8
1.6 KB | 26 lines Raw
1
import { MaterialIcons } from "@expo/vector-icons";
2
import { TriggerCategory } from "@/constants/triggers";
3

4
export interface TriggerCategoryDefinition {
5
  id: TriggerCategory;
6
  label: string;
7
  icon: keyof typeof MaterialIcons.glyphMap;
8
  color: string;
9
  iconBackground: string;
10
  variant: string;
11
}
12

13
export const TRIGGER_CATEGORY_DEFINITIONS: TriggerCategoryDefinition[] = [
14
  { id: "WORK",     label: "Trabalho", icon: "work",            color: "#3b82f6", iconBackground: "#dbeafe", variant: "blue" },
15
  { id: "SOCIAL",   label: "Social",   icon: "diversity-1",     color: "#8b5cf6", iconBackground: "#ede9fe", variant: "purple" },
16
  { id: "HEALTH",   label: "Saúde",    icon: "healing",         color: "#34c272", iconBackground: "#d4f5e2", variant: "green" },
17
  { id: "FAMILY",   label: "Família",  icon: "family-restroom", color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
18
  { id: "PHYSICAL", label: "Físico",   icon: "fitness-center",  color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
19
  { id: "THERAPY",  label: "Terapia",  icon: "psychology",       color: "#6366f1", iconBackground: "#e0e7ff", variant: "indigo" },
20
  { id: "INTERNAL", label: "Interno",  icon: "self-improvement", color: "#ec4899", iconBackground: "#fce7f3", variant: "pink" },
21
  { id: "OTHER",    label: "Outro",    icon: "help-outline",    color: "#94a3b8", iconBackground: "#f1f5f9", variant: "gray" },
22
];
23

24
export const getTriggerCategory = (id: string): TriggerCategoryDefinition =>
25
  TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === id) ??
26
  TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === "OTHER")!;