import type { orders } from "@fluid-app/orders-core";
import type { OrdersDict } from "@fluid-app/orders-core/translation-dictionary";
import type { TranslationApi } from "@fluid-app/i18n/translation-api";
export type T = TranslationApi<OrdersDict>["t"];
export type FilterKey = "all" | "fulfilled" | "preparing" | "subscription";
export type StatusKind = "fulfilled" | "preparing" | "shipped" | "cancelled" | "pending";
export interface MappedStatus {
    kind: StatusKind;
    label: string;
}
/**
 * Map a raw status string (typically `fulfillment_status`) from the BFF
 * onto our internal status vocabulary (`StatusKind`). Aliases are folded
 * together (`unfulfilled` → `pending`, `in_progress`/`scheduled` →
 * `preparing`, etc.). Unknown statuses pass through with `kind: "pending"`
 * and the raw label capitalized — never synthesize a colored pill that
 * pretends to be real status data.
 */
export declare function mapStatus(orderStatus: string, t: T): MappedStatus;
export declare const STATUS_STYLES: Record<StatusKind, {
    bg: string;
    text: string;
    dot: string;
}>;
/**
 * Pick the right status string to drive the pill / filter for a list order.
 * Cancelled-family lifecycle states come from `order_status`; everything
 * else is read off `fulfillment_status` (the BFF source-of-truth per the
 * `Commerce::Order#fulfillment_status` enum).
 */
export declare function statusForOrder(order: orders.ListOrder): string;
export declare function filterPredicate(filter: FilterKey, order: orders.ListOrder): boolean;
export declare function countByFilter(list: orders.ListOrder[]): Record<FilterKey, number>;
export interface OrderGroup {
    label: string;
    orders: orders.ListOrder[];
}
/**
 * The date to show reps in the order history list. Prefers `sale_date`
 * (when the sale actually happened — meaningful for historical orders
 * imported via sync, where `created_at` is just when the row landed in
 * Fluid) and falls back to `created_at` for orders placed natively.
 */
export declare function orderDisplayDate(order: orders.ListOrder): string;
/**
 * Group orders into date buckets ("This week", "This month", month name, or
 * "{Month} {year}" for anything older than the current year). Insertion
 * order is preserved within and between buckets so newest-first ordering
 * from the BFF carries through.
 *
 * `t` resolves the structural bucket labels ("This week" / "This month").
 * Older buckets use `toLocaleDateString` which is locale-aware on its own.
 * `now` is injectable for tests; defaults to the current wall-clock time.
 *
 * Buckets reps by `orderDisplayDate` — sale_date when set, created_at
 * otherwise — so historical imported orders land in their real-life
 * month instead of the day they were synced into Fluid.
 */
export declare function groupOrdersByDate(list: orders.ListOrder[], t: T, now?: Date): OrderGroup[];
/**
 * Render a friendly relative-time label for an order's created_at.
 * `t` resolves the relative-time templates; `{{n}}` placeholders are
 * substituted by the i18n system. Absolute dates use
 * `toLocaleDateString` which is locale-aware on its own.
 * `now` is injectable for tests.
 */
export declare function formatFriendlyDate(iso: string, t: T, now?: Date): string;
/**
 * Compute the per-image transform for the photo-stack fan in `OrderRow`.
 * Index 0 is the front (centered, no rotation); index 1 peeks right;
 * index 2 peeks left.
 */
export declare function fanStyle(i: number, count: number): {
    left: string;
    transform: string;
    zIndex: number;
};
//# sourceMappingURL=portal-orders-list-helpers.d.ts.map