import axios from 'axios'

const url = import.meta.env.VITE_APP_REST_ENDPOINT
const instance = axios.create({
  baseURL: url
})

const getUid = async () => await instance.get('/uid')
const getUidRegional = async (regional: number) => await instance.get('/uid?regional=' + regional)
const getRegional = async () => await instance.get('/regional')
const getMedia = async () => await instance.get('/media')
const getJenisTransaksi = async () => await instance.get('/jenisTransaksi')
const getUp3 = async (uid: number) => await instance.get('/up3?uid=' + uid)
const getUlp = async (up3: number) => await instance.get('/ulp?up3=' + up3)
const getPosko = async (uppp: number) => await instance.get('/posko?up3=' + uppp)
export {
  getUid,
  getUp3,
  getPosko,
  getUlp,
  getMedia,
  getJenisTransaksi,
  getUidRegional,
  getRegional
}
