import e from"@babel/runtime/helpers/defineProperty";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var n=function(e,t){if(!e)return null;var n=e.parent_asset?r(r({},e),{},{parent_asset_id:e.parent_asset.id,company_id:t}):{id:e.active_well.id,name:e.active_well.name,company_id:t,parent_asset:{id:e.id,name:e.name},parent_asset_id:e.id};return e.id?n:null};export{n as normalizeAssetForApp};
