import{q as n}from"./index-GtUymKue.js";class o{static async getPluginList(){const{data:t}=await n.get("/Plugin/List");return t.data}static async registerPluginManager(){const{data:t}=await n.post("/Plugin/RegisterManager");return t.data}static async setPluginStatus(t,a){await n.post("/Plugin/SetStatus",{id:t,enable:a})}static async uninstallPlugin(t,a){await n.post("/Plugin/Uninstall",{id:t,cleanData:a})}static async importLocalPlugin(t){const a=new FormData;a.append("plugin",t);const{data:i}=await n.post("/Plugin/Import",a,{headers:{"Content-Type":"multipart/form-data"},timeout:6e4});return i.data}static async getPluginStoreList(t=!1){const a=t?{forceRefresh:"true"}:{},{data:i}=await n.get("/Plugin/Store/List",{params:a});return i.data}static async getPluginStoreDetail(t){const{data:a}=await n.get(`/Plugin/Store/Detail/${t}`);return a.data}static async installPluginFromStore(t,a){await n.post("/Plugin/Store/Install",{id:t,mirror:a},{timeout:3e5})}static async getPluginConfig(t){const{data:a}=await n.get("/Plugin/Config",{params:{id:t}});return a.data}static async setPluginConfig(t,a){await n.post("/Plugin/Config",{id:t,config:a})}static async notifyConfigChange(t,a,i,s,e){await n.post("/Plugin/Config/Change",{id:t,sessionId:a,key:i,value:s,currentConfig:e})}static getConfigSSEUrl(t,a){const i=new URLSearchParams({id:t});return a&&i.set("config",JSON.stringify(a)),`/api/Plugin/Config/SSE?${i.toString()}`}}export{o as P};
