const onLoad=async()=>{const n=document.getElementById("libraryAttributes");n&&(n.innerHTML=Object.keys(window.emuiDiagnostics||{}).reduce((e,t)=>e+=`<li>${t}</li>`,""));const{logger:o,http:i,logUnhandledErrors:r,webvitals:s}=window.emuiDiagnostics;o&&(window.logger=o({transport:i("https://int.api.ellielabs.com/diagnostics/v2/logging"),index:"pui",environment:"dev",team:"ui platform",appName:"diagnostics demo",appVersion:"1.0.0",instanceId:"",userId:""}),s(window.logger),r(window.logger),window.logger.info("application started")),document.getElementById("unhandledErrorBtn").addEventListener("click",()=>{throw new Error("This is an unhandled error")}),document.getElementById("rejectedPromiseBtn").addEventListener("click",()=>{Promise.reject(new Error("This is a rejected promise"))});const l=document.getElementById("submitBtn"),d=document.getElementById("message"),a=document.getElementById("level"),c=document.getElementById("output");l.addEventListener("click",()=>{const e=d.value;if(!e){alert("Please enter a message");return}const t=a.value;if(!t){alert("Please select a log level");return}window.logger[t](e),c.value=`Logged message: ${e} with level: ${t}`})};window.addEventListener("load",onLoad);

//# sourceMappingURL=test.js.map