@fluid-app/portal-sdk 0.1.84 → 0.1.86

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.
Files changed (94) hide show
  1. package/dist/{AppDownloadScreen-B-JdFulZ.cjs → AppDownloadScreen-BcpYbAZo.cjs} +4 -4
  2. package/dist/{AppDownloadScreen-CaTNCtzb.cjs → AppDownloadScreen-DQOgNOQY.cjs} +2 -2
  3. package/dist/{AppDownloadScreen-CaTNCtzb.cjs.map → AppDownloadScreen-DQOgNOQY.cjs.map} +1 -1
  4. package/dist/{AppDownloadScreen-BE6M8WxN.mjs → AppDownloadScreen-DsKIUmDP.mjs} +2 -2
  5. package/dist/{AppDownloadScreen-BE6M8WxN.mjs.map → AppDownloadScreen-DsKIUmDP.mjs.map} +1 -1
  6. package/dist/{CarouselWidget-v1NWYsQe.mjs → CarouselWidget-BSUwgJQ3.mjs} +3 -3
  7. package/dist/CarouselWidget-BSUwgJQ3.mjs.map +1 -0
  8. package/dist/{CarouselWidget-A4_pvjCL.cjs → CarouselWidget-BWHWH48S.cjs} +1 -1
  9. package/dist/{CarouselWidget-DDW8GqoX.cjs → CarouselWidget-srEpxcKU.cjs} +3 -3
  10. package/dist/CarouselWidget-srEpxcKU.cjs.map +1 -0
  11. package/dist/{ContactsScreen-DvmqkXOu.cjs → ContactsScreen-1DC328FQ.cjs} +2 -2
  12. package/dist/{ContactsScreen-DvmqkXOu.cjs.map → ContactsScreen-1DC328FQ.cjs.map} +1 -1
  13. package/dist/{ContactsScreen-DrkHWPMm.mjs → ContactsScreen-Bs3DtjXw.mjs} +2 -2
  14. package/dist/{ContactsScreen-DrkHWPMm.mjs.map → ContactsScreen-Bs3DtjXw.mjs.map} +1 -1
  15. package/dist/{ContactsScreen-Du9M90zi.cjs → ContactsScreen-C-v5Yrxn.cjs} +4 -4
  16. package/dist/{FluidProvider-BSBLJp15.cjs → FluidProvider-DGm9zaDs.cjs} +5 -5
  17. package/dist/{FluidProvider-BSBLJp15.cjs.map → FluidProvider-DGm9zaDs.cjs.map} +1 -1
  18. package/dist/{FluidProvider-CwkMUOoy.mjs → FluidProvider-DpiMY5TW.mjs} +5 -5
  19. package/dist/{FluidProvider-CwkMUOoy.mjs.map → FluidProvider-DpiMY5TW.mjs.map} +1 -1
  20. package/dist/{MessagingScreen-Cg2XvQZF.mjs → MessagingScreen-BI8BzJKm.mjs} +3 -3
  21. package/dist/{MessagingScreen-Cg2XvQZF.mjs.map → MessagingScreen-BI8BzJKm.mjs.map} +1 -1
  22. package/dist/{MessagingScreen-C4-8_bvB.mjs → MessagingScreen-CSkPf1fv.mjs} +4 -4
  23. package/dist/{MessagingScreen-BlN6KjV-.cjs → MessagingScreen-CVAFDLsZ.cjs} +4 -4
  24. package/dist/{MessagingScreen-Lc81OXIN.cjs → MessagingScreen-GijHV-DQ.cjs} +3 -3
  25. package/dist/{MessagingScreen-Lc81OXIN.cjs.map → MessagingScreen-GijHV-DQ.cjs.map} +1 -1
  26. package/dist/{MySiteScreen-BedF13nt.mjs → MySiteScreen-Bg6LNzsn.mjs} +2 -2
  27. package/dist/{MySiteScreen-BedF13nt.mjs.map → MySiteScreen-Bg6LNzsn.mjs.map} +1 -1
  28. package/dist/{MySiteScreen-DEOKI32H.cjs → MySiteScreen-CrLr2D4S.cjs} +4 -4
  29. package/dist/{MySiteScreen-B-I4V3Cc.cjs → MySiteScreen-D8HSLknT.cjs} +2 -2
  30. package/dist/{MySiteScreen-B-I4V3Cc.cjs.map → MySiteScreen-D8HSLknT.cjs.map} +1 -1
  31. package/dist/{OrdersScreen-BE_E1QGL.cjs → OrdersScreen-DiQTxyIy.cjs} +4 -4
  32. package/dist/{OrdersScreen-CfAmUUN3.mjs → OrdersScreen-Dn0fEtdh.mjs} +3 -3
  33. package/dist/{OrdersScreen-CfAmUUN3.mjs.map → OrdersScreen-Dn0fEtdh.mjs.map} +1 -1
  34. package/dist/{OrdersScreen-C-rU9cx6.cjs → OrdersScreen-DuGMu--7.cjs} +3 -3
  35. package/dist/{OrdersScreen-C-rU9cx6.cjs.map → OrdersScreen-DuGMu--7.cjs.map} +1 -1
  36. package/dist/{PointsWidget-D8U2k-_A.cjs → PointsWidget-Bgl95R-6.cjs} +2 -2
  37. package/dist/PointsWidget-Bgl95R-6.cjs.map +1 -0
  38. package/dist/{PointsWidget-CYesuDDG.mjs → PointsWidget-C05iCMne.mjs} +2 -2
  39. package/dist/PointsWidget-C05iCMne.mjs.map +1 -0
  40. package/dist/{ProductsScreen-Csw96ete.cjs → ProductsScreen--1YW_UgE.cjs} +3 -3
  41. package/dist/{ProductsScreen-Csw96ete.cjs.map → ProductsScreen--1YW_UgE.cjs.map} +1 -1
  42. package/dist/{ProductsScreen-DUPhUJ7p.cjs → ProductsScreen-C6vvURBQ.cjs} +4 -4
  43. package/dist/{ProductsScreen-CgG79XW9.mjs → ProductsScreen-COd2v64K.mjs} +5 -4
  44. package/dist/{ProductsScreen-CGo9KQ9L.mjs → ProductsScreen-Cp0Ca5fO.mjs} +3 -3
  45. package/dist/{ProductsScreen-CGo9KQ9L.mjs.map → ProductsScreen-Cp0Ca5fO.mjs.map} +1 -1
  46. package/dist/{ProfileScreen-CANmoFsP.cjs → ProfileScreen-BbMzMV7N.cjs} +3 -3
  47. package/dist/{ProfileScreen-CANmoFsP.cjs.map → ProfileScreen-BbMzMV7N.cjs.map} +1 -1
  48. package/dist/{ProfileScreen-BSZLS9hY.cjs → ProfileScreen-CuCgYLYg.cjs} +4 -4
  49. package/dist/{ProfileScreen-C4g7ZGPo.mjs → ProfileScreen-WigtmiOv.mjs} +3 -3
  50. package/dist/{ProfileScreen-C4g7ZGPo.mjs.map → ProfileScreen-WigtmiOv.mjs.map} +1 -1
  51. package/dist/{ShareablesScreen-loETsu9v.cjs → ShareablesScreen-CECBa_sH.cjs} +4 -4
  52. package/dist/{ShareablesScreen-BK0H5fb2.mjs → ShareablesScreen-Ceb5wUmc.mjs} +4 -4
  53. package/dist/{ShareablesScreen-BK0H5fb2.mjs.map → ShareablesScreen-Ceb5wUmc.mjs.map} +1 -1
  54. package/dist/{ShareablesScreen-D0kIiW8S.cjs → ShareablesScreen-D5_P3VVk.cjs} +4 -4
  55. package/dist/{ShareablesScreen-D0kIiW8S.cjs.map → ShareablesScreen-D5_P3VVk.cjs.map} +1 -1
  56. package/dist/{ShareablesScreen-BmKYYRZq.mjs → ShareablesScreen-Ds-a4dSK.mjs} +5 -4
  57. package/dist/{ShopScreen-CDwCW5Go.cjs → ShopScreen-BG2O9grs.cjs} +93 -74
  58. package/dist/ShopScreen-BG2O9grs.cjs.map +1 -0
  59. package/dist/{ShopScreen-CaTpU5go.cjs → ShopScreen-CfriRC8H.cjs} +4 -4
  60. package/dist/{ShopScreen-B0Pr0CTu.mjs → ShopScreen-DjXzkEHA.mjs} +94 -75
  61. package/dist/{ShopScreen-B0Pr0CTu.mjs.map → ShopScreen-DjXzkEHA.mjs.map} +1 -1
  62. package/dist/{SubscriptionsScreen-D3LAx25s.mjs → SubscriptionsScreen-Bc1L9w_R.mjs} +3 -3
  63. package/dist/{SubscriptionsScreen-D3LAx25s.mjs.map → SubscriptionsScreen-Bc1L9w_R.mjs.map} +1 -1
  64. package/dist/{SubscriptionsScreen-CfvaEuTS.cjs → SubscriptionsScreen-CntycOyp.cjs} +3 -3
  65. package/dist/{SubscriptionsScreen-CfvaEuTS.cjs.map → SubscriptionsScreen-CntycOyp.cjs.map} +1 -1
  66. package/dist/{SubscriptionsScreen-Dpn0YuDb.cjs → SubscriptionsScreen-DCUFhSbh.cjs} +4 -4
  67. package/dist/index.cjs +36 -36
  68. package/dist/index.d.cts +1 -0
  69. package/dist/index.d.cts.map +1 -1
  70. package/dist/index.d.mts +1 -0
  71. package/dist/index.d.mts.map +1 -1
  72. package/dist/index.mjs +36 -36
  73. package/dist/{use-account-clients-62dZrh9E.cjs → use-account-clients-C9UjVcyo.cjs} +2 -2
  74. package/dist/{use-account-clients-62dZrh9E.cjs.map → use-account-clients-C9UjVcyo.cjs.map} +1 -1
  75. package/dist/{use-account-clients-Cf_6sxeC.mjs → use-account-clients-oKk8PvPK.mjs} +2 -2
  76. package/dist/{use-account-clients-Cf_6sxeC.mjs.map → use-account-clients-oKk8PvPK.mjs.map} +1 -1
  77. package/dist/{use-current-user-Bl9nPNFt.mjs → use-current-user-CoGu5DT7.mjs} +3 -3
  78. package/dist/{use-current-user-Bl9nPNFt.mjs.map → use-current-user-CoGu5DT7.mjs.map} +1 -1
  79. package/dist/{use-current-user-SFCzJt0q.cjs → use-current-user-D2YUKSpk.cjs} +3 -3
  80. package/dist/{use-current-user-SFCzJt0q.cjs.map → use-current-user-D2YUKSpk.cjs.map} +1 -1
  81. package/dist/{use-customer-account-BoobPvSQ.cjs → use-customer-account-B-eDvs2m.cjs} +3 -3
  82. package/dist/{use-customer-account-BoobPvSQ.cjs.map → use-customer-account-B-eDvs2m.cjs.map} +1 -1
  83. package/dist/{use-customer-account-Dt3kO7ti.mjs → use-customer-account-CQr2JJOY.mjs} +3 -3
  84. package/dist/{use-customer-account-Dt3kO7ti.mjs.map → use-customer-account-CQr2JJOY.mjs.map} +1 -1
  85. package/dist/{use-fluid-api-DPhr-9Jv.mjs → use-fluid-api-B6740M-8.mjs} +2 -2
  86. package/dist/{use-fluid-api-DPhr-9Jv.mjs.map → use-fluid-api-B6740M-8.mjs.map} +1 -1
  87. package/dist/{use-fluid-api-DwRQk00z.cjs → use-fluid-api-LVdptjW2.cjs} +2 -2
  88. package/dist/{use-fluid-api-DwRQk00z.cjs.map → use-fluid-api-LVdptjW2.cjs.map} +1 -1
  89. package/package.json +10 -10
  90. package/dist/CarouselWidget-DDW8GqoX.cjs.map +0 -1
  91. package/dist/CarouselWidget-v1NWYsQe.mjs.map +0 -1
  92. package/dist/PointsWidget-CYesuDDG.mjs.map +0 -1
  93. package/dist/PointsWidget-D8U2k-_A.cjs.map +0 -1
  94. package/dist/ShopScreen-CDwCW5Go.cjs.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { n as __exportAll } from "./chunk-ByhMGyNw.mjs";
2
- import { n as useFluidContext } from "./FluidProvider-CwkMUOoy.mjs";
2
+ import { n as useFluidContext } from "./FluidProvider-DpiMY5TW.mjs";
3
3
  import { A as SelectContent, F as RadioGroupItem, I as Input, Kt as Breadcrumb, M as SelectTrigger, N as SelectValue, P as RadioGroup, Xt as BreadcrumbPage, Yt as BreadcrumbList, dn as Button, j as SelectItem, k as Select, qt as BreadcrumbItem, x as Skeleton, xt as Card } from "./src-77nf0QPD.mjs";
4
- import { i as useSdkClient, o as useFluidAuth } from "./use-account-clients-Cf_6sxeC.mjs";
4
+ import { i as useSdkClient, o as useFluidAuth } from "./use-account-clients-oKk8PvPK.mjs";
5
5
  import { n as useScreenHeaderActions, r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-NdrJ58Mg.mjs";
6
- import { n as useCurrentUser } from "./use-current-user-Bl9nPNFt.mjs";
6
+ import { n as useCurrentUser } from "./use-current-user-CoGu5DT7.mjs";
7
7
  import { n as useAppNavigation } from "./AppNavigationContext-BSnbFILQ.mjs";
8
8
  import { n as listProducts, t as getProduct } from "./products-Dkwd_Bh0.mjs";
9
9
  import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
10
10
  import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
- import { ArrowLeft, ChevronLeft, ChevronRight, CirclePlay, Search, ShoppingCart } from "lucide-react";
12
+ import { ArrowLeft, ChevronLeft, ChevronRight, CirclePlay, Link, Search, ShoppingCart } from "lucide-react";
13
13
  import { createPortal } from "react-dom";
14
14
  import { create } from "zustand";
15
15
  import "zustand/middleware";
@@ -1345,7 +1345,7 @@ function ProductListing({ countryCode, companyLogoUrl, renderImage, onSelectProd
1345
1345
  })]
1346
1346
  });
1347
1347
  }
1348
- function ProductDetail({ productId, countryCode, renderImage, onBack, onAddToCart, cartButton }) {
1348
+ function ProductDetail({ productId, countryCode, renderImage, onBack, onAddToCart, cartButton, companyName }) {
1349
1349
  const { product, isLoading, error, currentVariant, productOptions, effectiveSelectedOptions, handleOptionChange, quantity, setQuantity, isSubscribe, userSelectedSubscribe, setUserSelectedSubscribe, showBuyOnce, showSubscribe, selectedSubscriptionPlan, setSelectedSubscriptionPlan, displayPrice, displayWholesalePrice, displayWholesaleSubscriptionPrice, wholesaleCv, wholesaleQv, currentVariantCountry } = useProductDetail({
1350
1350
  productId,
1351
1351
  countryCode
@@ -1361,6 +1361,8 @@ function ProductDetail({ productId, countryCode, renderImage, onBack, onAddToCar
1361
1361
  currentVariant?.images,
1362
1362
  coverImage
1363
1363
  ]);
1364
+ const isBundle = product?.bundle === true;
1365
+ const bundleUrl = isBundle && product?.canonical_url ? product.canonical_url : null;
1364
1366
  const handleAddToCart = () => {
1365
1367
  if (!onAddToCart || !currentVariant?.id) return;
1366
1368
  onAddToCart(currentVariant.id, quantity, isSubscribe, selectedSubscriptionPlan?.subscription_plan?.id?.toString());
@@ -1435,7 +1437,7 @@ function ProductDetail({ productId, countryCode, renderImage, onBack, onAddToCar
1435
1437
  className: "text-foreground text-3xl font-bold",
1436
1438
  children: title
1437
1439
  }),
1438
- /* @__PURE__ */ jsxs("div", {
1440
+ !isBundle && /* @__PURE__ */ jsxs("div", {
1439
1441
  className: "mb-2 flex items-center gap-2",
1440
1442
  children: [/* @__PURE__ */ jsx("span", {
1441
1443
  className: "text-foreground text-sm",
@@ -1455,81 +1457,96 @@ function ProductDetail({ productId, countryCode, renderImage, onBack, onAddToCar
1455
1457
  dangerouslySetInnerHTML: { __html: sanitizeHtml(product.description ?? "") }
1456
1458
  })]
1457
1459
  }),
1458
- /* @__PURE__ */ jsx(PurchaseOptions, {
1459
- showBuyOnce,
1460
- showSubscribe,
1461
- isSubscribe,
1462
- userSelectedSubscribe,
1463
- onSubscribeChange: setUserSelectedSubscribe,
1464
- wholesalePrice: currentVariantCountry?.wholesale,
1465
- wholesaleSubscriptionPrice: currentVariantCountry?.wholesale_subscription_price,
1466
- product_subscription_plans: product.product_subscription_plans || [],
1467
- selectedSubscriptionPlan,
1468
- onSubscriptionPlanChange: setSelectedSubscriptionPlan
1469
- }),
1470
- /* @__PURE__ */ jsxs("div", {
1471
- className: "text-muted-foreground mb-3 text-sm",
1472
- children: [
1473
- "CV ",
1474
- countryCode && wholesaleCv != null ? wholesaleCv : "-",
1475
- " | QV",
1476
- " ",
1477
- countryCode && wholesaleQv != null ? wholesaleQv : "-"
1478
- ]
1479
- }),
1480
- /* @__PURE__ */ jsx("div", { className: "flex items-center border-t" }),
1481
- productOptions.length > 0 && /* @__PURE__ */ jsx("div", {
1482
- className: "mb-4 pt-4",
1483
- children: productOptions.map((option) => /* @__PURE__ */ jsxs("div", {
1484
- className: "mb-3 flex items-center",
1485
- children: [/* @__PURE__ */ jsx("h3", {
1486
- className: "text-md text-foreground w-24 font-bold",
1487
- children: option.name.charAt(0).toUpperCase() + option.name.slice(1)
1488
- }), /* @__PURE__ */ jsxs(Select, {
1489
- value: effectiveSelectedOptions[option.id] || "",
1490
- onValueChange: (value) => handleOptionChange(option.id, value),
1491
- children: [/* @__PURE__ */ jsx(SelectTrigger, {
1492
- className: "w-48 max-w-full",
1493
- children: /* @__PURE__ */ jsx(SelectValue, { placeholder: `Select ${option.name}` })
1494
- }), /* @__PURE__ */ jsx(SelectContent, { children: option.values.map((value) => /* @__PURE__ */ jsx(SelectItem, {
1495
- value,
1496
- children: value
1497
- }, value)) })]
1498
- })]
1499
- }, option.id))
1500
- }),
1501
- currentVariant?.subscription_only && !currentVariant.allow_subscription && /* @__PURE__ */ jsx("div", {
1502
- className: "text-muted-foreground text-sm",
1503
- children: "This product is unavailable for purchase."
1504
- }),
1505
- /* @__PURE__ */ jsx("div", { className: "mb-3" }),
1506
- /* @__PURE__ */ jsxs("div", {
1507
- className: "flex items-center gap-3 pb-3",
1508
- children: [/* @__PURE__ */ jsx(QuantitySelector, {
1509
- quantity,
1510
- setQuantity
1511
- }), /* @__PURE__ */ jsxs(Button, {
1512
- disabled: !currentVariant?.id || currentVariant?.subscription_only && !currentVariant.allow_subscription,
1460
+ isBundle ? /* @__PURE__ */ jsxs("div", {
1461
+ className: "pt-4",
1462
+ children: [/* @__PURE__ */ jsxs(Button, {
1513
1463
  variant: "default",
1514
- className: "flex-1 gap-2 py-2 text-base font-medium",
1515
- onClick: onAddToCart ? handleAddToCart : void 0,
1516
- ...!onAddToCart && {
1517
- "data-fluid-add-to-cart": String(currentVariant?.id ?? ""),
1518
- "data-fluid-quantity": quantity,
1519
- "data-fluid-subscribe": isSubscribe,
1520
- "data-fluid-subscription-plan-id": isSubscribe ? selectedSubscriptionPlan?.subscription_plan?.id?.toString() || product.product_subscription_plans?.find((plan) => plan.default)?.subscription_plan.id.toString() || product.product_subscription_plans?.[0]?.subscription_plan.id.toString() || "" : "",
1521
- "data-fluid-open-cart-after-add": "false"
1464
+ className: "w-full gap-2 py-2 text-base font-medium",
1465
+ disabled: !bundleUrl,
1466
+ onClick: () => {
1467
+ if (bundleUrl) window.open(bundleUrl, "_blank", "noopener,noreferrer");
1522
1468
  },
1523
- children: [/* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), isSubscribe ? "Subscribe" : "Add to Cart"]
1469
+ children: [/* @__PURE__ */ jsx(Link, { className: "h-5 w-5" }), companyName ? `Purchase at ${companyName}` : "Purchase Bundle"]
1470
+ }), !bundleUrl && /* @__PURE__ */ jsx("p", {
1471
+ className: "text-muted-foreground mt-2 text-center text-xs",
1472
+ children: "Bundle configuration is unavailable. Please contact support."
1524
1473
  })]
1525
- })
1474
+ }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
1475
+ /* @__PURE__ */ jsx(PurchaseOptions, {
1476
+ showBuyOnce,
1477
+ showSubscribe,
1478
+ isSubscribe,
1479
+ userSelectedSubscribe,
1480
+ onSubscribeChange: setUserSelectedSubscribe,
1481
+ wholesalePrice: currentVariantCountry?.wholesale,
1482
+ wholesaleSubscriptionPrice: currentVariantCountry?.wholesale_subscription_price,
1483
+ product_subscription_plans: product.product_subscription_plans || [],
1484
+ selectedSubscriptionPlan,
1485
+ onSubscriptionPlanChange: setSelectedSubscriptionPlan
1486
+ }),
1487
+ /* @__PURE__ */ jsxs("div", {
1488
+ className: "text-muted-foreground mb-3 text-sm",
1489
+ children: [
1490
+ "CV ",
1491
+ countryCode && wholesaleCv != null ? wholesaleCv : "-",
1492
+ " | QV ",
1493
+ countryCode && wholesaleQv != null ? wholesaleQv : "-"
1494
+ ]
1495
+ }),
1496
+ /* @__PURE__ */ jsx("div", { className: "flex items-center border-t" }),
1497
+ productOptions.length > 0 && /* @__PURE__ */ jsx("div", {
1498
+ className: "mb-4 pt-4",
1499
+ children: productOptions.map((option) => /* @__PURE__ */ jsxs("div", {
1500
+ className: "mb-3 flex items-center",
1501
+ children: [/* @__PURE__ */ jsx("h3", {
1502
+ className: "text-md text-foreground w-24 font-bold",
1503
+ children: option.name.charAt(0).toUpperCase() + option.name.slice(1)
1504
+ }), /* @__PURE__ */ jsxs(Select, {
1505
+ value: effectiveSelectedOptions[option.id] || "",
1506
+ onValueChange: (value) => handleOptionChange(option.id, value),
1507
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
1508
+ className: "w-48 max-w-full",
1509
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: `Select ${option.name}` })
1510
+ }), /* @__PURE__ */ jsx(SelectContent, { children: option.values.map((value) => /* @__PURE__ */ jsx(SelectItem, {
1511
+ value,
1512
+ children: value
1513
+ }, value)) })]
1514
+ })]
1515
+ }, option.id))
1516
+ }),
1517
+ currentVariant?.subscription_only && !currentVariant.allow_subscription && /* @__PURE__ */ jsx("div", {
1518
+ className: "text-muted-foreground text-sm",
1519
+ children: "This product is unavailable for purchase."
1520
+ }),
1521
+ /* @__PURE__ */ jsx("div", { className: "mb-3" }),
1522
+ /* @__PURE__ */ jsxs("div", {
1523
+ className: "flex items-center gap-3 pb-3",
1524
+ children: [/* @__PURE__ */ jsx(QuantitySelector, {
1525
+ quantity,
1526
+ setQuantity
1527
+ }), /* @__PURE__ */ jsxs(Button, {
1528
+ disabled: !currentVariant?.id || currentVariant?.subscription_only && !currentVariant.allow_subscription,
1529
+ variant: "default",
1530
+ className: "flex-1 gap-2 py-2 text-base font-medium",
1531
+ onClick: onAddToCart ? handleAddToCart : void 0,
1532
+ ...!onAddToCart && {
1533
+ "data-fluid-add-to-cart": String(currentVariant?.id ?? ""),
1534
+ "data-fluid-quantity": quantity,
1535
+ "data-fluid-subscribe": isSubscribe,
1536
+ "data-fluid-subscription-plan-id": isSubscribe ? selectedSubscriptionPlan?.subscription_plan?.id?.toString() || product.product_subscription_plans?.find((plan) => plan.default)?.subscription_plan.id.toString() || product.product_subscription_plans?.[0]?.subscription_plan.id.toString() || "" : "",
1537
+ "data-fluid-open-cart-after-add": "false"
1538
+ },
1539
+ children: [/* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), isSubscribe ? "Subscribe" : "Add to Cart"]
1540
+ })]
1541
+ })
1542
+ ] })
1526
1543
  ]
1527
1544
  })]
1528
1545
  })
1529
1546
  })]
1530
1547
  });
1531
1548
  }
1532
- function ShopApp({ countryCode, companyLogoUrl, renderImage, onAddToCart, productId: controlledProductId, onSelectProduct: onSelectProductProp, onBack: onBackProp, cartButton }) {
1549
+ function ShopApp({ countryCode, companyLogoUrl, renderImage, onAddToCart, productId: controlledProductId, onSelectProduct: onSelectProductProp, onBack: onBackProp, cartButton, companyName }) {
1533
1550
  const [internalProductId, setInternalProductId] = useState(null);
1534
1551
  const activeProductId = controlledProductId !== void 0 ? controlledProductId : internalProductId;
1535
1552
  const handleSelectProduct = onSelectProductProp ?? setInternalProductId;
@@ -1540,7 +1557,8 @@ function ShopApp({ countryCode, companyLogoUrl, renderImage, onAddToCart, produc
1540
1557
  renderImage,
1541
1558
  onBack: handleBack,
1542
1559
  onAddToCart,
1543
- cartButton
1560
+ cartButton,
1561
+ companyName
1544
1562
  });
1545
1563
  return /* @__PURE__ */ jsx(ProductListing, {
1546
1564
  countryCode,
@@ -1742,7 +1760,8 @@ function ShopScreen({ background, textColor, accentColor, padding, borderRadius,
1742
1760
  companyLogoUrl: userData?.company?.logo_url,
1743
1761
  productId,
1744
1762
  onSelectProduct: (id) => navigate(`shop/${id}`),
1745
- onBack: () => navigate("shop")
1763
+ onBack: () => navigate("shop"),
1764
+ companyName: userData?.company?.name
1746
1765
  })
1747
1766
  })
1748
1767
  })
@@ -1760,4 +1779,4 @@ const shopScreenPropertySchema = {
1760
1779
  //#endregion
1761
1780
  export { ShopScreen_exports as n, shopScreenPropertySchema as r, ShopScreen as t };
1762
1781
 
1763
- //# sourceMappingURL=ShopScreen-B0Pr0CTu.mjs.map
1782
+ //# sourceMappingURL=ShopScreen-DjXzkEHA.mjs.map