import e from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import t from"jsona";import{SEGMENTS as n}from"../constants/segment.js";import{getDashboards as a}from"../clients/jsonApi/index.js";var o=function(e){var r;return null===(r=e.find((function(e){return"tabs"===e.layout})))||void 0===r?void 0:r.slug};function s(){return i.apply(this,arguments)}function i(){return i=e(r.mark((function e(){var s,i,u,c,l,p=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=p.length>0&&void 0!==p[0]?p[0]:[],i=o(s)){e.next=15;break}return u=new t,e.prev=4,e.next=7,a({layout:"tabs",segment:n.DRILLING,type:"asset_dashboard",visibility:"visible"});case 7:c=e.sent,l=u.deserialize(c),i=o(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.error(e.t0);case 15:return e.abrupt("return",i);case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),i.apply(this,arguments)}export{s as default};
