{"version":3,"file":"D21QuS8q.js","sources":["../../../../skeleton/composables/useSupportedCurrencies.ts","../../../../skeleton/components/modal/currencies.vue"],"sourcesContent":["import { useApiAuthInstance } from '@skeleton/core/assets/apiAuthInstance';\n\nexport function useSupportedCurrencies(initialPayDefinition?: string, initialPayMethod?: string) {\n const payDefinition = ref(initialPayDefinition);\n const payMethod = ref(initialPayMethod);\n const allSupportedCurrencies = ref([]);\n\n const fetchSupportedCurrencies = async () => {\n if (!payDefinition.value || !payMethod.value) return;\n try {\n const { data } = await useApiAuthInstance(`/api/payment/currencies/${payDefinition.value}/${payMethod.value}`);\n allSupportedCurrencies.value = data;\n } catch (e) {\n allSupportedCurrencies.value = [];\n }\n };\n\n watch(\n [payDefinition, payMethod],\n async () => {\n await fetchSupportedCurrencies();\n },\n { immediate: true }\n );\n return { allSupportedCurrencies };\n}\n","\n\n\n\n