/**
 * Order display utilities
 * Re-exports domain logic for backward compatibility in the frontend
 */

import type { OrderDisplayItem } from "@customer-portal/domain/orders";
import { summarizeItems } from "./summary";

export { buildOrderDisplayItems, categorizeOrderItem } from "@customer-portal/domain/orders";

export type {
  OrderDisplayItem,
  OrderDisplayItemCategory,
  OrderDisplayItemCharge,
  OrderDisplayItemChargeKind,
} from "@customer-portal/domain/orders";

/**
 * Summarize order display items for compact display
 */
export function summarizeOrderDisplayItems(items: OrderDisplayItem[], fallback: string): string {
  return summarizeItems(items, fallback);
}
