import axiosInstance from "./axiosInstance";
import axios from "axios";

const BASE_URL = "https://api.ridoo.co.in";



// REGISTER
export const registerCustomer = (data: any) =>
  axios.post(`${BASE_URL}/api/users/customer/register/`, data);

// SEND OTP
export const sendOtp = (phone_number: string) =>
  axios.post(`${BASE_URL}/api/users/customer/send-otp/`, {
    phone_number,
  });

// VERIFY OTP
export const verifyOtp = (data: any) =>
  axios.post(`${BASE_URL}/api/users/customer/verify-otp/`, data);

// REFRESH TOKEN
export const refreshToken = (refresh_token: string) =>
  axios.post(`${BASE_URL}/api/users/auth/token/refresh/`, {
    refresh_token,
  });

// LOGOUT
export const logoutApi = (refresh_token: string) =>
  axios.post(`${BASE_URL}/api/users/auth/logout/`, {
    refresh_token,
  });