var getWrappedValue=function(e,t){var r=e;t.split(".").forEach((function(e){if(!r){return}r=r[e]}));return r};var getDataModelFieldDisplayValue=function(e,t,r){var i;if(t.id==="name"&&!e.name){return e.user.firstName+" "+e.user.lastName}if(r===null||r===void 0?void 0:r.includes(".")){return getWrappedValue(e,r)}else if((i=t===null||t===void 0?void 0:t.id)===null||i===void 0?void 0:i.includes(".")){return getWrappedValue(e,t.id)}if(!t){return e[r]}return e[t.id]};function getDataModelField(e,t){return e[t]}var DataModel=function(){function e(){}e.decode=function(t){return Object.assign(Object.create(e.prototype),t)};e.prototype.toObject=function(){return JSON.parse(JSON.stringify(this))};e.prototype.toDBRef=function(e){return{_ref:e,_id:this._id}};return e}();DataModel.decodeList=function(e){if(e===void 0){e=[]}return e.map((function(e){return DataModel.decode(e)}))};export{DataModel as D,getDataModelFieldDisplayValue as a,getDataModelField as g};