import{X as e,Y as s,Z as u,$ as a}from"./e.4add7a3d.js";async function r(r,d){const i=new e,l=await s(r),n="/hacsfiles/"+d.full_name.split("/")[1],o=`${n}/${d.file_name}`,t=l.find(e=>e.url.includes(n));i.debug({namespace:n,url:o,exsisting:t},"updateLovelaceResources"),t&&t.url!==o?(i.debug("Updating exsusting resource for "+n),u(r,{url:o,resource_id:t.id,res_type:t.type})):l.map(e=>e.url).includes(o)||(i.debug(`Adding ${o} to Lovelace resources`),a(r,{url:o,res_type:"module"}))}export{r as u};
