export interface Category { id: string; label: string; color: string; icon: string; } export const CATEGORIES: Record = { food: { id: "food", label: "Dining", color: "#CCA050", icon: "\u{1F37D}" }, trail: { id: "trail", label: "Trail", color: "#85A894", icon: "\u{1F338}" }, landmark: { id: "landmark", label: "Landmark", color: "#7E98B0", icon: "\u{1F4CD}" }, fuel: { id: "fuel", label: "Fuel", color: "#8B5CF6", icon: "\u26FD" }, "rest-stop": { id: "rest-stop", label: "Rest Stop", color: "#6B7280", icon: "\u{1F6BB}" }, lodging: { id: "lodging", label: "Lodging", color: "#C9A84C", icon: "\u{1F3E8}" }, hospital: { id: "hospital", label: "Hospital", color: "#C07060", icon: "\u{1F3E5}" }, }; export function getCategory(id: string): Category { return CATEGORIES[id] ?? { id, label: id, color: "#6B7280", icon: "\u{1F4CC}" }; } export function slugify(name: string): string { return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, ""); }