import React from 'react';
import { locales } from '@pisell/utils';
import "./showAddToCartToast.less";
/**
 * 加车成功 Toast：商品名 +「已有 N 件」（复用 ticket-booking.in-cart 文案）。
 */
export function showAddToCartToast(Toast, title, quantity) {
  if (!(Toast !== null && Toast !== void 0 && Toast.success)) return;
  var displayQty = quantity > 0 ? quantity : 1;
  Toast.success( /*#__PURE__*/React.createElement("div", {
    className: "sales-sdk-add-toast-wrap"
  }, /*#__PURE__*/React.createElement("div", {
    className: "sales-sdk-add-toast-title"
  }, title), /*#__PURE__*/React.createElement("div", {
    className: "sales-sdk-add-toast-quantity"
  }, locales.getText('pisell2.ticket-booking.in-cart')(displayQty))));
}