var getWrappedValue=function(e,t){var n=e;t.split(".").forEach((function(e){if(!n){return}n=n[e]}));return n};var getDataModelFieldDisplayValue=function(e,t,n){var a;if((n==="name"||(t===null||t===void 0?void 0:t.id)==="name")&&!e.name){return"".concat(e.user.firstName," ").concat(e.user.lastName)}if(n===null||n===void 0?void 0:n.includes(".")){return getWrappedValue(e,n)}else if((a=t===null||t===void 0?void 0:t.id)===null||a===void 0?void 0:a.includes(".")){return getWrappedValue(e,t.id)}if(!t){return e[n]}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};