const baseURL = import.meta.env.VITE_API_BASE_URL;
const baseIdentityURL = import.meta.env.VITE_IDENTITY_API_BASE_URL;

let customer = {
  search: `${baseURL}/Customer/Search`,
  suggest: `${baseURL}/Customer/Suggest?keyword=`,
  createOrUpdate: `${baseURL}/Customer/CreateOrUpdate`,
  updateProp: `${baseURL}/Customer/UpdateProp`,
  getProp: `${baseURL}/Customer/GetProp?customerId=`,
  getById: `${baseURL}/Customer/GetById?id=`,
  delete: `${baseURL}/Customer/Delete?id=`,
  lock: `${baseURL}/Customer/Lock`,
  unLock: `${baseURL}/Customer/UnLock`,
  registerAccount: `${baseIdentityURL}/Customer/RegisterCustomerAccount`,
  getManagerById: `${baseURL}/Customer/GetManagerById?id=`,
  assignManager: `${baseURL}/Customer/AssignManager`,
  setPassword: `${baseIdentityURL}/Customer/SetPassword`,
};

let customerAddress = {
  createOrUpdate: `${baseURL}/CustomerAddress/CreateOrUpdate`,
  getById: `${baseURL}/CustomerAddress/getById?id=`,
  delete: `${baseURL}/CustomerAddress/Delete?id=`,
  suggest: `${baseURL}/CustomerAddress/Suggest`,
  search: `${baseURL}/CustomerAddress/Search`,
};

let lead = {
  createOrUpdate: `${baseURL}/Lead/CreateOrUpdate`,
  assignManager: `${baseURL}/Lead/AssignManager`,
  getById: `${baseURL}/Lead/getById?id=`,
  search: `${baseURL}/Lead/Search`,
  getReviewModel: `${baseURL}/Lead/GetReviewModel?id=`,
  updateReview: `${baseURL}/Lead/UpdateReview`,
};

let customerBankAccount = {
  getByCustomerId: `${baseURL}/CustomerBankAccount/GetByCustomerId/`,
  getById: `${baseURL}/CustomerBankAccount/`,
  createOrUpdate: `${baseURL}/CustomerBankAccount/CreateOrUpdate`,
  delete: `${baseURL}/CustomerBankAccount/`,
  setDefault: `${baseURL}/CustomerBankAccount/SetDefault/`,
  getDefaultByCustomerId: `${baseURL}/CustomerBankAccount/GetDefaultByCustomerId/`,
  search: `${baseURL}/CustomerBankAccount/Search`,
};

let vatInfo = {
  search: `${baseURL}/VatInfo/Search`,
  getById: `${baseURL}/VatInfo/GetById?id=`,
  getDefaultByCustomerId: `${baseURL}/VatInfo/GetDefaultByCustomerId?customerId=`,
  createOrUpdate: `${baseURL}/VatInfo/CreateOrUpdate`,
  delete: `${baseURL}/VatInfo/Delete?id=`,
  setAsDefault: `${baseURL}/VatInfo/SetAsDefault?id=`,
};

export { customer, customerAddress, lead, customerBankAccount, vatInfo };
