var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/ticketBooking/serve.ts
var serve_exports = {};
__export(serve_exports, {
  addNotesByOrder: () => addNotesByOrder,
  createBooking: () => createBooking,
  createEventBooking: () => createEventBooking,
  editBooking: () => editBooking,
  editBookingStatus: () => editBookingStatus,
  editEventBooking: () => editEventBooking,
  editNoteByOrder: () => editNoteByOrder,
  editOrderNote: () => editOrderNote,
  getAddonsByOrderId: () => getAddonsByOrderId,
  getBookingConfig: () => getBookingConfig,
  getBookingDetail: () => getBookingDetail,
  getBookingList2: () => getBookingList2,
  getClients: () => getClients,
  getClientsEs: () => getClientsEs,
  getDepositShow: () => getDepositShow,
  getEventBookingDetail: () => getEventBookingDetail,
  getFormRecords: () => getFormRecords,
  getForms: () => getForms,
  getNotesByOrder: () => getNotesByOrder,
  getOrderInfoByCode: () => getOrderInfoByCode,
  getPaymentList: () => getPaymentList,
  getPets: () => getPets,
  getPetsData: () => getPetsData,
  getProductList: () => getProductList,
  getProducts: () => getProducts,
  getRefundInfo: () => getRefundInfo,
  getResources: () => getResources,
  getServices: () => getServices,
  removeNoteByOrder: () => removeNoteByOrder,
  saveAddonsByOrderId: () => saveAddonsByOrderId,
  saveBookingFormData: () => saveBookingFormData,
  voidAppointment: () => voidAppointment
});
module.exports = __toCommonJS(serve_exports);
var import_utils = require("./../../utils");
var prefix = "/shop";
var getClients = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/customer/select-list", params);
  return data;
};
var getServices = async (params) => {
  const { _config } = params;
  let res = await import_utils.request.getRequest().post(prefix + "/product/query", params, _config);
  if (_config == null ? void 0 : _config.fullResult) {
    return res;
  }
  return res.data;
};
var getResources = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/form/schedule", params);
  return data;
};
var getProducts = async (params) => {
  let { data } = await import_utils.request.getRequest().post(prefix + "/product/query", params);
  return data;
};
var getForms = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/form/relation/record", params);
  return data;
};
var getBookingConfig = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/core/board/management/config", {
    item_type: "appointment_booking",
    ...params
  });
  return data;
};
var getPets = async (formId, params) => {
  let { data } = await import_utils.request.getRequest().get(`/form/${formId}`, params);
  return data;
};
var getPetsData = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/form/data/v1", params);
  return data;
};
var createBooking = async (params) => {
  let { data } = await import_utils.request.getRequest().post(prefix + "/order/appointment", params);
  return data;
};
var getAddonsByOrderId = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().get(`${prefix}/order/appointment/addons/${bookingId}`, params);
  return data;
};
var saveAddonsByOrderId = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/order/appointment/addons/${bookingId}`, params);
  return data;
};
var getBookingDetail = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().get(`${prefix}/order/appointment/${bookingId}`, params);
  return data;
};
var editBookingStatus = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/schedule/booking/appointment-status/${bookingId}`, params);
  return data;
};
var editBooking = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/order/appointment/v1.1/${bookingId}`, params);
  return data;
};
var getNotesByOrder = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/schedule/event-note", params);
  return data;
};
var addNotesByOrder = async (params) => {
  let { data } = await import_utils.request.getRequest().post(prefix + "/schedule/event-note", params);
  return data;
};
var editNoteByOrder = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/schedule/event-note/${bookingId}`, params);
  return data;
};
var removeNoteByOrder = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().remove(`${prefix}/schedule/event-note/${bookingId}`, params);
  return data;
};
var saveBookingFormData = async (params) => {
  let { data } = await import_utils.request.getRequest().post(prefix + "/form/relation/record/form", params);
  return data;
};
var getPaymentList = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/order/payment", params);
  return data;
};
var editOrderNote = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/order/order/${bookingId}/note`, params);
  return data;
};
var getRefundInfo = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().get(`${prefix}/order/refund-info/${bookingId}`, params);
  return data;
};
var createEventBooking = async (params) => {
  let { data } = await import_utils.request.getRequest().post(prefix + "/eventbookingv2/order", params);
  return data;
};
var getEventBookingDetail = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().get(`${prefix}/eventbookingv2/order/${bookingId}`, params);
  return data;
};
var editEventBooking = async (bookingId, params) => {
  let { data } = await import_utils.request.getRequest().put(`${prefix}/eventbookingv2/order/${bookingId}`, params);
  return data;
};
var getDepositShow = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/metadata", {
    key: "bookingv2_deposit",
    ...params
  });
  return data;
};
var getFormRecords = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/form/records", params);
  return data;
};
var getBookingList2 = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/schedule/booking", params);
  return data;
};
var getOrderInfoByCode = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/machinecode/order-info", params);
  return data;
};
var getClientsEs = async (params) => {
  let { data } = await import_utils.request.getRequest().get(prefix + "/customer/es/data", params);
  return data;
};
var voidAppointment = async (order_id) => {
  let { data } = await import_utils.request.getRequest().put(prefix + `/order/void/appointment/${order_id}`, {});
  return data;
};
var getProductList = async (params) => {
  let data = await import_utils.request.getRequest().post(prefix + "/product/query", params, {
    // cache: {
    // type: "indexDB",
    // updateCache: true,
    // }
  });
  return data;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  addNotesByOrder,
  createBooking,
  createEventBooking,
  editBooking,
  editBookingStatus,
  editEventBooking,
  editNoteByOrder,
  editOrderNote,
  getAddonsByOrderId,
  getBookingConfig,
  getBookingDetail,
  getBookingList2,
  getClients,
  getClientsEs,
  getDepositShow,
  getEventBookingDetail,
  getFormRecords,
  getForms,
  getNotesByOrder,
  getOrderInfoByCode,
  getPaymentList,
  getPets,
  getPetsData,
  getProductList,
  getProducts,
  getRefundInfo,
  getResources,
  getServices,
  removeNoteByOrder,
  saveAddonsByOrderId,
  saveBookingFormData,
  voidAppointment
});
