"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SendFeedback = exports.ResetPassword = void 0;
var _axiosAPIClient = require("../api/axiosAPIClient");
var _enums = require("../constants/enums");
var _wrapperService = require("./wrapperService");
const REACT_APP_AUTHAPI_URL = process.env.REACT_APP_AUTHAPI_URL;
const REACT_APP_EXPAPI_URL = process.env.REACT_APP_EXPAPI_URL;
const RESET_PASSWORD_URL = _enums.endPoints.RESET_PASSWORD_URL;
const SEND_FEEDBACK_URL = _enums.endPoints.SEND_FEEDBACK_URL;
const SendFeedback = async (input, brandID) => {
  try {
    const url = "".concat(REACT_APP_EXPAPI_URL).concat(SEND_FEEDBACK_URL).concat(brandID);
    const response = await _axiosAPIClient.axiosApiInstance.post(url, input);
    if (response.status === 200) {
      return await response.data;
    }
  } catch (err) {
    throw new Error("Exception occurred");
  }
};
exports.SendFeedback = SendFeedback;
const ResetPassword = async input => {
  const url = "".concat(REACT_APP_AUTHAPI_URL).concat((0, _wrapperService.getAPIPrefix)()).concat(RESET_PASSWORD_URL);
  const response = await _axiosAPIClient.axiosApiInstance.post(url, input);
  return await response.data;
};
exports.ResetPassword = ResetPassword;