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