"use strict";var e=require('./../ext-esm/tslib/tslib.es6.js'),t=require("react"),r=require("../clients/jsonApi/index.js");function s(t){var s,i;return e.__awaiter(this,void 0,void 0,(function(){var n,u;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r.getAsset(t,{fields:["asset.custom_properties"]})];case 1:return n=e.sent(),[2,(null===(i=null===(s=n.data.attributes)||void 0===s?void 0:s.custom_properties)||void 0===i?void 0:i.is_asset_viewer)||!1];case 2:return u=e.sent(),console.error(u),[2,!1];case 3:return[2]}}))}))}module.exports=function(r){var i=r.well,n=r.wells,u=t.useState(null),o=u[0],a=u[1];return t.useEffect((function(){!function(){e.__awaiter(this,void 0,void 0,(function(){var t,r;return e.__generator(this,(function(e){switch(e.label){case 0:return t=a,i?[4,s(i.asset_id)]:[3,2];case 1:return r=e.sent(),[3,3];case 2:r=n.some((function(e){var t;return null===(t=e.custom_properties)||void 0===t?void 0:t.is_asset_viewer})),e.label=3;case 3:return t.apply(void 0,[r]),[2]}}))}))}()}),[i,n]),o};
