import { formatDashboardMoneyMinor } from "@/modules/dashboard/use-dashboard-analytics";

export { signedMoneyClass as signedSettlementMoneyClass } from "@/lib/admin-signed-money";

export function formatSignedSettlementMoney(amount: number, currencyCode: string): string {
  if (amount === 0) {
    return formatDashboardMoneyMinor(0, currencyCode);
  }

  const prefix = amount < 0 ? "−" : "+";
  return `${prefix}${formatDashboardMoneyMinor(Math.abs(amount), currencyCode)}`;
}
