import{b as t}from"./CF1ujZlL.js";import{e as g}from"./92N1comP.js";async function i(){return t.get("/gpm/plugins")}async function r(e){return t.get(`/gpm/plugins/${e}`)}async function o(e,n){await t.patch(`/config/plugins/${e}`,{enabled:n})}async function p(e){return(await t.get(`/gpm/plugins/${e}/readme`)).content}async function l(e){return(await t.get(`/gpm/plugins/${e}/changelog`)).content}async function m(e){const{data:n,headers:a}=await t.requestRaw("GET",`/config/plugins/${e}`);return{data:n,etag:g(a)}}async function f(e,n,a){const s={};a&&(s["If-Match"]=`"${a}"`),await t.requestRaw("PATCH",`/config/plugins/${e}`,{body:n,headers:s})}async function h(){return t.get("/gpm/repository/plugins",{per_page:"500"})}async function y(e){return t.post("/gpm/install",{package:e,type:"plugin"})}async function d(e){await t.post("/gpm/remove",{package:e})}async function w(e=!0){return t.get("/gpm/updates",{flush:e?"true":"false"})}async function P(e){return t.post("/gpm/update",{package:e})}async function T(){return t.post("/gpm/update-all",{})}async function $(){return t.post("/gpm/upgrade",{})}async function k(){return t.get("/gpm/themes")}async function v(e){return t.get(`/gpm/themes/${e}`)}async function C(e){await t.patch("/config/system",{pages:{theme:e}})}async function R(e){return(await t.get(`/gpm/themes/${e}/readme`)).content}async function b(e){return(await t.get(`/gpm/themes/${e}/changelog`)).content}async function q(e){const{data:n,headers:a}=await t.requestRaw("GET",`/config/themes/${e}`);return{data:n,etag:g(a)}}async function A(e,n,a){const s={};a&&(s["If-Match"]=`"${a}"`),await t.requestRaw("PATCH",`/config/themes/${e}`,{body:n,headers:s})}async function E(){return t.get("/gpm/repository/themes",{per_page:"500"})}async function I(e){return t.post("/gpm/install",{package:e,type:"theme"})}async function x(e){await t.post("/gpm/remove",{package:e})}export{m as a,h as b,o as c,p as d,l as e,v as f,r as g,q as h,E as i,A as j,x as k,R as l,b as m,C as n,y as o,i as p,w as q,d as r,f as s,T as t,P as u,I as v,k as w,$ as x};
