import type { MoneyDTO, PercentageDTO, QuantityDTO } from "../dto";

/** MoneyDTO: { value, scale, currency_code } */
export function areMoneyDTOEqual(a?: MoneyDTO | null, b?: MoneyDTO | null): boolean {
  return a?.value === b?.value && a?.scale === b?.scale && a?.currency_code === b?.currency_code;
}

/** QuantityDTO: { value, scale } */
export function areQuantityDTOEqual(a?: QuantityDTO | null, b?: QuantityDTO | null): boolean {
  return a?.value === b?.value && a?.scale === b?.scale;
}

/** PercentageDTO: { value, scale } */
export function arePercentageDTOEqual(a?: PercentageDTO | null, b?: PercentageDTO | null): boolean {
  return a?.value === b?.value && a?.scale === b?.scale;
}
