import{r as e,t}from"./axios-Ba4xKhTU.js";import{ta as n}from"./endpoints-DlZlVT68.js";async function r(r){let i={headers:{Accept:`application/json`,"Content-Type":`application/json`}};try{let a=(await t.get(e+n,i)).data.conversion_rates[r.toUpperCase()];if(!a)throw Error(`Moneda no soportada`);return a}catch(e){throw console.error(`Error al obtener la tasa de cambio:`,e),e}}export{r as t};