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