const i="/assets/theme-config-7bf94f6c.svg",w={config:{name:"Theme Maker",type:"process",icon:i,targetVer:"2.0.0"},run:async t=>{const o=await t.loadLibrary("lib/WindowManager"),n=await t.loadLibrary("lib/HTML"),{Input:c,Button:h}=await t.loadLibrary("lib/Components"),m=o.createWindow({title:"Theme Maker",icon:i,width:600,height:200},t),r=new n(m.content),l=["crust","mantle","base","surface-0","surface-1","surface-2","text"],s=c.new().attr({value:"My Theme"});r.appendMany(new n("div").appendMany(new n("label").text("Name: "),s),...l.map(e=>new n("div").appendMany(new n("label").text(`${e[0].toUpperCase()+e.slice(1)}: `),c.new().attr({type:"color",id:e,value:"#000000"}))),h.new().text("Create").on("click",()=>{const e={name:s.getValue(),colors:{}};l.forEach(a=>{e.colors[a]=r.qs(`#${a}`)?.getValue()}),t.fs.writeFile(`/etc/themes/${e.name.replace(/\s/g,"")}.theme`,JSON.stringify(e)).then(()=>{o.createModal("ok","Theme Manager","Theme created successfully.",t).catch(a=>console.error(a))}).catch(a=>console.error(a))}))}};export{w as default};