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