| 1 | import { MaterialIcons } from "@expo/vector-icons";
|
| 2 | import { TriggerCategory } from "@/constants/triggers";
|
| 3 | import type { BadgeVariant } from "@/components/ui/Badge";
|
| 4 |
|
| 5 | export interface TriggerCategoryDefinition {
|
| 6 | id: TriggerCategory;
|
| 7 | label: string;
|
| 8 | icon: keyof typeof MaterialIcons.glyphMap;
|
| 9 | color: string;
|
| 10 | iconBackground: string;
|
| 11 | variant: BadgeVariant;
|
| 12 | }
|
| 13 |
|
| 14 | export const TRIGGER_CATEGORY_DEFINITIONS: TriggerCategoryDefinition[] = [
|
| 15 | { id: "WORK", label: "Trabalho", icon: "work", color: "#3b82f6", iconBackground: "#dbeafe", variant: "blue" },
|
| 16 | { id: "SOCIAL", label: "Social", icon: "diversity-1", color: "#8b5cf6", iconBackground: "#ede9fe", variant: "purple" },
|
| 17 | { id: "HEALTH", label: "Saúde", icon: "healing", color: "#34c272", iconBackground: "#d4f5e2", variant: "green" },
|
| 18 | { id: "FAMILY", label: "Família", icon: "family-restroom", color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
|
| 19 | { id: "PHYSICAL", label: "Físico", icon: "fitness-center", color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
|
| 20 | { id: "THERAPY", label: "Terapia", icon: "psychology", color: "#6366f1", iconBackground: "#e0e7ff", variant: "indigo" },
|
| 21 | { id: "INTERNAL", label: "Interno", icon: "self-improvement", color: "#ec4899", iconBackground: "#fce7f3", variant: "pink" },
|
| 22 | { id: "OTHER", label: "Outro", icon: "help-outline", color: "#94a3b8", iconBackground: "#f1f5f9", variant: "gray" },
|
| 23 | ];
|
| 24 |
|
| 25 | export const getTriggerCategory = (id: string): TriggerCategoryDefinition =>
|
| 26 | TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === id) ??
|
| 27 | TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === "OTHER")!;
|