import Configuration from "../Configuration";

const getAjaxActionUrl = (actionName) => {
  const config = Configuration.getInstance();
  const sep = config.ajax_url.indexOf('?') > 0 ? '&' : '?';
  const requestUrl = config.ajax_url + sep + 'action=dreamfox_wdd_' + actionName + '&nonce=' + encodeURIComponent(config.nonce);

  return requestUrl;
}

export default getAjaxActionUrl;