import{o as e,t}from"./axios-Yyz76XvX.js";var n=`sk_bf32c8b3b2d342baace620c67b7f10c2`,r=`pk_2b13389c063a4b789e8e81e4040557e1`;async function i(i){let a={headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Basic ${btoa(`${n}:${r}`)}`}};try{let n=await t.post(e+`/customers/`,i,a);if(n.status===200||n.status===201){let e=n.data;return console.log(`Usuario creado:`,e),e}else throw console.error(`Error al crear usuario:`,n.statusText),Error(`Error al crear usuario`)}catch(e){throw console.error(`Error de red:`,e),e}}async function a(i){let a={headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Basic ${btoa(`${n}:${r}`)}`}};try{let n=await t.post(e+`/cards/`,i,a);if(n.status===200||n.status===201){let e=n.data;return console.log(`Tarjeta creada:`,e),e}else throw console.error(`Error al crear la tarjeta:`,n.statusText),Error(`Error al crear la tarjeta`)}catch(e){throw console.error(`Error de red:`,e),e}}async function o(i){let a={headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Basic ${btoa(`${n}:${r}`)}`}};try{let n=await t.post(e+`/charges/`,i,a);if(n.status===200||n.status===201){let e=n.data;return console.log(`Cargo creado:`,e),e}else throw console.error(`Error al crear el cargo:`,n.statusText),Error(`Error al crear el cargo`)}catch(e){throw console.error(`Error de red:`,e),e}}export{a as n,i as r,o as t};