/** * Helpers for the closing-template item UOM editor (the Default group pills). * * `disabledMeasurements` holds the unit ids that are OFF — the base unit id * and/or measurement ids; everything not listed is enabled. These helpers are * the single source of truth for reading/toggling that state, reused by both * the editable Default rows and the read-only named-group chips. */ export interface UnitChip { id: string; label: string; isBase: boolean; factor: number; enabled: boolean; } /** Base unit + measurements with their enabled state. */ export declare function templateItemUnits(item: FdoClosingTemplateItem): UnitChip[]; export declare function templateItemEnabledCount(item: FdoClosingTemplateItem): number; /** Enabled UOM labels (base + measurements), read-only — e.g. ["PC", "BOX ×50"]. */ export declare function templateItemActiveLabels(item: FdoClosingTemplateItem): string[]; /** * Toggle a unit on/off. Returns the updated item, or `null` when the change is * not allowed (never disable the last enabled unit). */ export declare function toggleTemplateItemUnit(item: FdoClosingTemplateItem, chip: UnitChip): FdoClosingTemplateItem | null;