import { useContext as useContext$1 } from "./useContext.js";
import React from "react";
import { locales } from "@pisell/utils";
import { Iconfont } from "@pisell/materials";
import classNames from "classnames";
//#region src/components/shoppingCart/hooks/useAddService.tsx
const useAddService = (id, type) => {
	const { state, onAddProduct } = useContext$1();
	const { isProductList, disabledEdit } = state;
	return !disabledEdit ? /* @__PURE__ */ React.createElement("div", {
		className: classNames("pisell-lowcode__shopping-cart-add-service", { "pisell-lowcode__shopping-cart-add-service-products": isProductList }),
		onClick: () => onAddProduct(id)
	}, /* @__PURE__ */ React.createElement("div", { style: {
		display: "flex",
		alignItems: "center",
		gap: 6
	} }, /* @__PURE__ */ React.createElement(Iconfont, { type: "pisell2-plus-circle" }), /* @__PURE__ */ React.createElement("span", null, type === "more" ? locales.getText("pisell2.text.shopping-cart.add.more") : locales.getText("pisell2.text.shopping-cart.add.service")))) : null;
};
//#endregion
export { useAddService as default };
