const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_useContext = require("./useContext.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let _pisell_materials = require("@pisell/materials");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
//#region src/components/shoppingCart/hooks/useAddService.tsx
const useAddService = (id, type) => {
	const { state, onAddProduct } = require_useContext.useContext();
	const { isProductList, disabledEdit } = state;
	return !disabledEdit ? /* @__PURE__ */ react.default.createElement("div", {
		className: (0, classnames.default)("pisell-lowcode__shopping-cart-add-service", { "pisell-lowcode__shopping-cart-add-service-products": isProductList }),
		onClick: () => onAddProduct(id)
	}, /* @__PURE__ */ react.default.createElement("div", { style: {
		display: "flex",
		alignItems: "center",
		gap: 6
	} }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, { type: "pisell2-plus-circle" }), /* @__PURE__ */ react.default.createElement("span", null, type === "more" ? _pisell_utils.locales.getText("pisell2.text.shopping-cart.add.more") : _pisell_utils.locales.getText("pisell2.text.shopping-cart.add.service")))) : null;
};
//#endregion
exports.default = useAddService;
