import{t as e}from"./client-hbcFGf8j.js";import{t}from"./endpoints-Bdye5CiX.js";var n={async listProviders(n){let{data:r}=await e.get(t.EXCHANGE_RATE_PROVIDERS,{params:n});return r},async getProvider(n){let{data:r}=await e.get(`${t.EXCHANGE_RATE_PROVIDERS}/${n}`);return r},async createProvider(n){let{data:r}=await e.post(t.EXCHANGE_RATE_PROVIDERS,n);return r},async updateProvider(n,r){let{data:i}=await e.put(`${t.EXCHANGE_RATE_PROVIDERS}/${n}`,r);return i},async deleteProvider(n){let{data:r}=await e.delete(`${t.EXCHANGE_RATE_PROVIDERS}/${n}`);return r},async getRate(n){let{data:r}=await e.get(`${t.CURRENCIES}/${n}/exchange-rate`),i=r;return i.exchangeRate&&Array.isArray(i.exchangeRate)?{exchangeRate:Number(i.exchangeRate[0])??null}:{exchangeRate:null}},async getActiveProvider(n){let{data:r}=await e.get(`${t.CURRENCIES}/${n}/active-provider`);return{hasActiveProvider:r.success===!0}},async getSupportedCurrencies(n){let{data:r}=await e.get(t.SUPPORTED_CURRENCIES,{params:n});return r},async getUsedCurrencies(n){let{data:r}=await e.get(t.USED_CURRENCIES,{params:n});return r},async getBulkCurrencies(){let{data:n}=await e.get(t.CURRENCIES_USED);return n},async bulkUpdateExchangeRate(n){let{data:r}=await e.post(t.CURRENCIES_BULK_UPDATE,n);return r},async getDrivers(){let{data:n}=await e.get(t.CONFIG,{params:{key:`exchange_rate_drivers`}});return n}};export{n as t};