import{d as i,$ as a}from"./app-QjDgb7aF.js";const s=a?`themes:${a.id}`:"";function r(){return JSON.parse(localStorage.getItem(s)||"[]")}async function n(){if(a!=null)try{const e=await i("i/registry/get",{scope:["client"],key:"themes"});localStorage.setItem(s,JSON.stringify(e))}catch(e){if(e.code==="NO_SUCH_KEY")return;throw e}}async function m(e){await n();const t=r().concat(e);await i("i/registry/set",{scope:["client"],key:"themes",value:t}),localStorage.setItem(s,JSON.stringify(t))}async function l(e){const t=r().filter(c=>c.id!==e.id);await i("i/registry/set",{scope:["client"],key:"themes",value:t}),localStorage.setItem(s,JSON.stringify(t))}export{m as a,n as f,r as g,l as r};
//# sourceMappingURL=theme-store-CQRTJOWj.js.map
