/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type Decision, type UrgencyKind } from './types.js'; /** * The queue's order: by urgency (overdue → due → routine), then the nearest * deadline first — a row with none after every row with one — then the greater * value first. Deadlines and values compare as East compares them, so a `NaN` * value takes its one place in East's order rather than scrambling the sort. * * @param a - A row * @param b - Another row * @returns Negative when `a` comes first, positive when `b` does, else 0 */ export declare function compareByUrgency(a: Decision, b: Decision): number; /** Section labels for the built-in urgency grouping. */ export declare const URGENCY_GROUP_LABEL: Record; /** One Group-by toolbar option — a built-in key or a custom accessor facet. */ export interface GroupOption { key: string; label: string; accessor?: (d: Decision) => string; } /** One resolved queue section. */ export interface QueueGroup { label: string; decisions: Decision[]; pastSla: number; total: number; /** Hosts the bulk Accept all (the urgency grouping's Routine section). */ bulk: boolean; } /** Folds the sorted rows into sections for the active grouping. Rows arrive * urgency-sorted, so first-appearance order gives Overdue → Due today → * Routine for the built-in and stable insertion order for the rest. */ export declare function buildGroups(rows: Decision[], option: GroupOption): QueueGroup[]; //# sourceMappingURL=grouping.d.ts.map