import{an as e,a9 as d}from"./index-DGnN4tUo.js";async function u(a){try{return(await e({url:"/plans",method:"get",params:a})).data}catch(r){console.error("Error fetching token:",r)}return null}async function i(a){try{const r=new URLSearchParams,o={csrfToken:await d(),...a};return Object.entries(o).forEach(([t,s])=>{r.append(t,s)}),(await e({url:"/plans/renewPopup",method:"post",data:r.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(r){console.error("Error fetching token:",r)}return null}async function p(a){try{const r=new URLSearchParams,n={userPlanId:a.userPlanId};return Object.entries(n).forEach(([c,t])=>{r.append(c,t)}),(await e({url:"/plans/delete",method:"post",data:r.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(r){console.error("Error fetching token:",r)}return null}async function f(a){try{const r=new URLSearchParams,n=await d(),o={...a,csrfToken:n};return Object.entries(o).forEach(([t,s])=>{r.append(t,s)}),(await e({url:"/plans/buy",method:"post",data:r.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(r){console.error("Error buying plan:",r)}return null}async function h(){try{return(await e({url:"/plans/buy",method:"get"})).data}catch(a){console.error("Error fetching plans:",a)}return null}export{f as b,p as d,u as f,h as g,i as r};
