const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
require("./showAddToCartToast.less");
//#region src/plus/salesSdk/components/showAddToCartToast.tsx
/**
* 加车成功 Toast：商品名 +「已有 N 件」（复用 ticket-booking.in-cart 文案）。
*/
function showAddToCartToast(Toast, title, quantity) {
	if (!(Toast === null || Toast === void 0 ? void 0 : Toast.success)) return;
	const displayQty = quantity > 0 ? quantity : 1;
	Toast.success(/* @__PURE__ */ react.default.createElement("div", { className: "sales-sdk-add-toast-wrap" }, /* @__PURE__ */ react.default.createElement("div", { className: "sales-sdk-add-toast-title" }, title), /* @__PURE__ */ react.default.createElement("div", { className: "sales-sdk-add-toast-quantity" }, _pisell_utils.locales.getText("pisell2.ticket-booking.in-cart")(displayQty))));
}
//#endregion
exports.showAddToCartToast = showAddToCartToast;
