@uptrademedia/site-kit 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2828,7 +2828,15 @@ function EventModal({
2828
2828
  phone: ""
2829
2829
  });
2830
2830
  const [additionalData, setAdditionalData] = useState({});
2831
+ const [processor, setProcessor] = useState(null);
2831
2832
  const schedule = propSchedule || event?.schedules?.[0] || event?.next_schedule;
2833
+ useEffect(() => {
2834
+ if (isOpen) {
2835
+ fetchActiveProcessor().then((p) => {
2836
+ if (p) setProcessor(p);
2837
+ });
2838
+ }
2839
+ }, [isOpen]);
2832
2840
  useEffect(() => {
2833
2841
  if (isOpen && event) {
2834
2842
  setError(null);
@@ -3252,12 +3260,19 @@ function EventModal({
3252
3260
  children: loading ? "Processing..." : isFree ? "Register Free" : `Pay ${formatPrice(total, event.currency)}`
3253
3261
  }
3254
3262
  ),
3255
- !isFree && /* @__PURE__ */ jsx("p", { style: {
3263
+ !isFree && /* @__PURE__ */ jsxs("p", { style: {
3256
3264
  textAlign: "center",
3257
3265
  fontSize: "0.75rem",
3258
3266
  color: "#666",
3259
3267
  margin: "0.75rem 0 0"
3260
- }, children: "\u{1F512} Secure checkout via Stripe" })
3268
+ }, children: [
3269
+ "\u{1F512} Secure checkout via ",
3270
+ processor === "square" ? "Square" : processor === "stripe" ? "Stripe" : "secure payment"
3271
+ ] }),
3272
+ !isFree && processor && /* @__PURE__ */ jsxs("p", { style: { fontSize: "0.625rem", color: "#999", margin: "0.25rem 0 0", textAlign: "center" }, children: [
3273
+ "Powered by ",
3274
+ processor === "stripe" ? "Stripe" : "Square"
3275
+ ] })
3261
3276
  ] })
3262
3277
  ] }) })
3263
3278
  ]
@@ -3895,5 +3910,5 @@ function getApiKey() {
3895
3910
  }
3896
3911
 
3897
3912
  export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal };
3898
- //# sourceMappingURL=chunk-A37Z47FZ.mjs.map
3899
- //# sourceMappingURL=chunk-A37Z47FZ.mjs.map
3913
+ //# sourceMappingURL=chunk-CNPLYTFZ.mjs.map
3914
+ //# sourceMappingURL=chunk-CNPLYTFZ.mjs.map