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