import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
import { request } from "../utils.js";
import { getFormatResourceListAndMap } from "./utils.js";
//#region src/components/booking/info2/serve.ts
const getResourceList = function() {
	var _ref = _asyncToGenerator(function* (params, bookingId = []) {
		let { data } = yield request.getRequest().get(`/shop/schedule/resource/list`, params, { cache: {
			mode: "remote_local",
			type: "indexDB"
		} });
		return getFormatResourceListAndMap(data, bookingId);
	});
	return function getResourceList(_x) {
		return _ref.apply(this, arguments);
	};
}();
const createBookings = function() {
	var _ref2 = _asyncToGenerator(function* (params) {
		let { data } = yield request.getRequest().post(`/shop/v1.1/order/appointment`, params);
		return data;
	});
	return function createBookings(_x2) {
		return _ref2.apply(this, arguments);
	};
}();
const editBookings = function() {
	var _ref3 = _asyncToGenerator(function* (params, id) {
		let { data } = yield request.getRequest().put(`/shop/v1.1/order/appointment/${id}`, params);
		return data;
	});
	return function editBookings(_x3, _x4) {
		return _ref3.apply(this, arguments);
	};
}();
/**
* 获取加盟店的影子账户id（不存在则创建）
*/
const getFranchiseeCustomer = function() {
	var _ref4 = _asyncToGenerator(function* (params) {
		let { data } = yield request.getRequest().get(`/shop/franchisee/customer/id`, params);
		return data;
	});
	return function getFranchiseeCustomer(_x5) {
		return _ref4.apply(this, arguments);
	};
}();
/**
* 获取客户列表（当前店铺）
*/
const getCustomerList = function() {
	var _ref5 = _asyncToGenerator(function* (params) {
		let { data } = yield request.getRequest().get(`/shop/customer/select-list`, params);
		return data;
	});
	return function getCustomerList(_x6) {
		return _ref5.apply(this, arguments);
	};
}();
//#endregion
export { createBookings, editBookings, getCustomerList, getFranchiseeCustomer, getResourceList };
