class i{async fetchData(){const e="/api/hf/public/fullhtml_rw?lang=it&isHeadSimple=false";let s,r;try{const a=await(await fetch(e,{headers:{client_id:"ClientHF_v4"}})).json(),n=a.htmlHead;s=a,r=n}catch(t){console.error("Error fetching header data:",t)}finally{return this.addHeadScripts(r),new Promise(t=>{t(s)})}}addHeadScripts(e){const s="<!--SB-START-->",r="<!--SB-END-->",t=document.getElementsByTagName("head").item(0),a=document.getElementsByTagName("body").item(0);if(a==null||a.classList.add("container"),t){const n=document.createElement("div");for(n.innerHTML=s+e+r;n.firstChild;)t.appendChild(n.firstChild)}}async CreateHeader(){const e=await this.fetchData();return e.htmlLogo+e.htmlHeader}async CreateFooter(){return(await this.fetchData()).htmlFooter}}export{i as H};
