import type { Task } from "./types"; export const PRIORITIES: Task["priority"][] = [1, 2, 3, 4]; export const PRIORITY_LABEL: Record = { 1: "Urgent", 2: "High", 3: "Medium", 4: "Low", }; // Todoist's flag mapping (urgent red → low grey), retuned to sit calmly on a // light canvas. `PRIORITY_TINT` is the same hue at wash strength, for the // selected state of a chip — a saturated fill would shout on a white card. export const PRIORITY_COLOR: Record = { 1: "#E5484D", 2: "#D98324", 3: "#2F6FED", 4: "#9A9AA2", }; export const PRIORITY_TINT: Record = { 1: "#FDECEC", 2: "#FBF0E2", 3: "#E8F0FE", 4: "#F0F0F3", }; export function formatEstimate(min: number | null): string | null { if (!min) return null; const h = Math.floor(min / 60); const m = min % 60; return h ? (m ? `${h}h${m}` : `${h}h`) : `${m}m`; }