/** Common warehouse units (Persian labels stored on the API). */ export const INVENTORY_UNITS = [ { value: "عدد", key: "piece" }, { value: "گرم", key: "gram" }, { value: "کیلوگرم", key: "kilogram" }, { value: "میلی‌لیتر", key: "milliliter" }, { value: "لیتر", key: "liter" }, { value: "سی‌سی", key: "cc" }, { value: "بسته", key: "pack" }, { value: "قوطی", key: "can" }, { value: "کیسه", key: "bag" }, ] as const; export const INVENTORY_UNIT_VALUES = INVENTORY_UNITS.map((u) => u.value); export type InventoryUnitValue = (typeof INVENTORY_UNIT_VALUES)[number]; export function isKnownInventoryUnit(unit: string): boolean { return INVENTORY_UNIT_VALUES.includes(unit as InventoryUnitValue); }