import axios from "axios";
import Configuration from "../Configuration";
import { getAjaxActionUrl } from "../utils";

export const apiActivateLicense = (data, callback) => {
  console.log('API: activate license...')
  if (Configuration.getInstance().is_debug) {
    // callback('This is callback from debug')
    console.log(data)
    return
  }
  const requestUrl = getAjaxActionUrl('activate_license');
  const ajax = axios.post(requestUrl, {
    data: data,
  })
  if (callback) {
    ajax.then(response => callback(response));
  }
}