import { defineBoot } from '#q-app/wrappers'
import axios, { type AxiosInstance } from 'axios';

declare module 'vue' {
  interface ComponentCustomProperties {
    $axios: AxiosInstance;
    $api: AxiosInstance;
    $osm: AxiosInstance;
  }
}

const api = axios.create({ baseURL: '/api' });
const osm = axios.create({ baseURL: '/osm' });

export default defineBoot(({ app }) => {
  app.config.globalProperties.$axios = axios
  app.config.globalProperties.$api = api
  app.config.globalProperties.$osm = osm
})

export { axios, api, osm };


