import { summarizeItems } from "./summary";

export {
  normalizeBillingCycle,
  deriveOrderStatusDescriptor,
  getOrderServiceCategory,
  getOrderServiceCategory as getServiceCategory,
  calculateOrderTotals,
  formatScheduledDate,
} from "@customer-portal/domain/orders";

export type {
  OrderStatusDescriptor,
  OrderStatusState,
  OrderStatusTone,
  OrderServiceCategory,
} from "@customer-portal/domain/orders";

export function summarizePrimaryItem(
  items: Array<{ name?: string; quantity?: number }> | undefined,
  fallback: string
): string {
  return summarizeItems(items, fallback);
}
