"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapUnits = mapUnits;
function isUnit(value) {
    return (typeof value === 'string' && value.trim().length > 0) || typeof value === 'number';
}
function mapUnits(payload) {
    return Object.entries(payload.units)
        .filter(([, uid]) => isUnit(uid))
        .map(([type, uid]) => ({
        type,
        uid: String(uid)
    }));
}
//# sourceMappingURL=unit.js.map