// Shared ticket status mapping. DB stores status as an int; APIs use labels. // Index in STATUSES = the stored integer value. export const STATUSES = ['open', 'queued', 'processing', 'done', 'failed', 'close']; export const statusToInt = (label) => STATUSES.indexOf(label); export const intToStatus = (n) => STATUSES[n] ?? 'open';