const baseURL = import.meta.env.VITE_API_BASE_URL;

const category = {
  search: `${baseURL}/Category/Search`,
  getTree: `${baseURL}/Category/GetTree`,
  createOrUpdate: `${baseURL}/Category/CreateOrUpdate`,
  getById: `${baseURL}/Category/GetById?id=`,
  delete: `${baseURL}/Category/Delete?id=`,
};

const location = {
  search: `${baseURL}/Location/Search`,
  createOrUpdate: `${baseURL}/Location/CreateOrUpdate`,
  getById: `${baseURL}/Location/GetById?id=`,
  getFullAddressByWard: `${baseURL}/Location/GetFullAddressByWard?id=`,
  delete: `${baseURL}/Location/Delete?id=`,
  loSug: `${baseURL}/Location/LoSug`,
  addressAutocomplete: `${baseURL}/Location/AddressAutocomplete`,
  placeDetail: `${baseURL}/Location/PlaceDetail`,
};

const agency = {
  autoComplete: `${baseURL}/Agency/AutoComplete?keyword=`,
  search: `${baseURL}/Agency/Search`,
  createOrUpdate: `${baseURL}/Agency/CreateOrUpdate`,
  getById: `${baseURL}/Agency/GetById?id=`,
  delete: `${baseURL}/Agency/Delete?id=`,
  updateStatus: `${baseURL}/Agency/UpdateStatus`,
  getTree: `${baseURL}/Agency/GetTree?keyword=`,
};

const endPoints = {
  search: `${baseURL}/EndPoints/Search`,
  autoGenerate: `${baseURL}/EndPoints/AutoGenerate`,
};

const route = {
  search: `${baseURL}/Route/Search`,
  createOrUpdate: `${baseURL}/Route/CreateOrUpdate`,
  delete: `${baseURL}/Route/Delete?id=`,
  getById: `${baseURL}/Route/GetById?id=`,
};

const agencyLocation = {
  getAgencyCoverage: `${baseURL}/AgencyLocation/GetAgencyCoverage`,
  getAvailableLocationsTree: `${baseURL}/AgencyLocation/GetAvailableLocationsTree`,
  addLocation: `${baseURL}/AgencyLocation/AddLocation`,
  removeLocation: `${baseURL}/AgencyLocation/RemoveLocation`,
};

export { category, location, agency, endPoints, route, agencyLocation };
