const REFERENCE_UNIT_CODES = ["kg", "l", "m2", "m3", "pc"];
const LEGACY_UNIT_CODE_ALIASES = {
  qty: "pc"
};
function canonicalizeUnitCode(value) {
  if (typeof value !== "string") return null;
  const trimmed = value.trim();
  if (!trimmed.length) return null;
  const alias = LEGACY_UNIT_CODE_ALIASES[trimmed.toLowerCase()];
  return alias ?? trimmed.toLowerCase();
}
function toUnitLookupKey(value) {
  return canonicalizeUnitCode(value);
}
export {
  REFERENCE_UNIT_CODES,
  canonicalizeUnitCode,
  toUnitLookupKey
};
//# sourceMappingURL=unitCodes.js.map
