hey-pharmacist-ecommerce 1.1.2 → 1.1.4

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.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React19, { createContext, forwardRef, useContext, useEffect, useState, useCallback, useMemo, useRef } from 'react';
2
+ import React20, { createContext, forwardRef, useContext, useEffect, useState, useCallback, useMemo, useRef } from 'react';
3
3
  import globalAxios4 from 'axios';
4
4
  import { Toaster, toast } from 'sonner';
5
5
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -13,7 +13,111 @@ import { useForm } from 'react-hook-form';
13
13
  import { zodResolver } from '@hookform/resolvers/zod';
14
14
  import { z } from 'zod';
15
15
 
16
- // src/providers/EcommerceProvider.tsx
16
+ var __defProp = Object.defineProperty;
17
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
18
+ var __getOwnPropNames = Object.getOwnPropertyNames;
19
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
20
+ var __esm = (fn, res) => function __init() {
21
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
22
+ };
23
+ var __export = (target, all) => {
24
+ for (var name in all)
25
+ __defProp(target, name, { get: all[name], enumerable: true });
26
+ };
27
+ var __copyProps = (to, from, except, desc) => {
28
+ if (from && typeof from === "object" || typeof from === "function") {
29
+ for (let key of __getOwnPropNames(from))
30
+ if (!__hasOwnProp.call(to, key) && key !== except)
31
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32
+ }
33
+ return to;
34
+ };
35
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
+
37
+ // src/lib/Apis/configuration.ts
38
+ var Configuration;
39
+ var init_configuration = __esm({
40
+ "src/lib/Apis/configuration.ts"() {
41
+ Configuration = class {
42
+ constructor(param = {}) {
43
+ this.apiKey = param.apiKey;
44
+ this.username = param.username;
45
+ this.password = param.password;
46
+ this.accessToken = param.accessToken;
47
+ this.basePath = param.basePath;
48
+ this.baseOptions = param.baseOptions;
49
+ }
50
+ };
51
+ }
52
+ });
53
+
54
+ // src/lib/api-adapter/config.ts
55
+ var config_exports = {};
56
+ __export(config_exports, {
57
+ clearAuthToken: () => clearAuthToken,
58
+ getApiConfiguration: () => getApiConfiguration,
59
+ getAuthToken: () => getAuthToken,
60
+ getCurrentConfig: () => getCurrentConfig,
61
+ initializeApiAdapter: () => initializeApiAdapter,
62
+ setAuthToken: () => setAuthToken
63
+ });
64
+ function initializeApiAdapter(config) {
65
+ currentConfig = config;
66
+ apiConfiguration = new Configuration({
67
+ basePath: config.apiBaseUrl,
68
+ apiKey: () => config.storeId,
69
+ // x-store-key header
70
+ accessToken: () => getAuthToken() || ""
71
+ // Bearer token
72
+ });
73
+ return apiConfiguration;
74
+ }
75
+ function getApiConfiguration() {
76
+ if (!apiConfiguration) {
77
+ throw new Error("API adapter not initialized. Call initializeApiAdapter first.");
78
+ }
79
+ return apiConfiguration;
80
+ }
81
+ function getCurrentConfig() {
82
+ if (!currentConfig) {
83
+ throw new Error("API adapter not initialized.");
84
+ }
85
+ return currentConfig;
86
+ }
87
+ function getTokenKey() {
88
+ const storeId = currentConfig?.storeId || "default";
89
+ return `ecommerce_access_token_${storeId}`;
90
+ }
91
+ function setAuthToken(token) {
92
+ if (typeof window !== "undefined") {
93
+ localStorage.setItem(getTokenKey(), token);
94
+ if (apiConfiguration) {
95
+ apiConfiguration.accessToken = () => token;
96
+ }
97
+ }
98
+ }
99
+ function getAuthToken() {
100
+ if (typeof window !== "undefined") {
101
+ return localStorage.getItem(getTokenKey());
102
+ }
103
+ return null;
104
+ }
105
+ function clearAuthToken() {
106
+ if (typeof window !== "undefined") {
107
+ localStorage.removeItem(getTokenKey());
108
+ if (apiConfiguration) {
109
+ apiConfiguration.accessToken = () => "";
110
+ }
111
+ }
112
+ }
113
+ var apiConfiguration, currentConfig;
114
+ var init_config = __esm({
115
+ "src/lib/api-adapter/config.ts"() {
116
+ init_configuration();
117
+ apiConfiguration = null;
118
+ currentConfig = null;
119
+ }
120
+ });
17
121
 
18
122
  // src/lib/utils/colors.ts
19
123
  function hexToRgb(hex) {
@@ -94,70 +198,11 @@ function ThemeProvider({ config, children }) {
94
198
  root.style.setProperty(`--header-to`, secondaryShades[600]);
95
199
  }
96
200
  }, [config]);
97
- return /* @__PURE__ */ React19.createElement(ThemeContext.Provider, { value: { config } }, children);
201
+ return /* @__PURE__ */ React20.createElement(ThemeContext.Provider, { value: { config } }, children);
98
202
  }
99
203
 
100
- // src/lib/Apis/configuration.ts
101
- var Configuration = class {
102
- constructor(param = {}) {
103
- this.apiKey = param.apiKey;
104
- this.username = param.username;
105
- this.password = param.password;
106
- this.accessToken = param.accessToken;
107
- this.basePath = param.basePath;
108
- this.baseOptions = param.baseOptions;
109
- }
110
- };
111
-
112
- // src/lib/api-adapter/config.ts
113
- var apiConfiguration = null;
114
- var currentConfig = null;
115
- function initializeApiAdapter(config) {
116
- currentConfig = config;
117
- apiConfiguration = new Configuration({
118
- basePath: config.apiBaseUrl,
119
- apiKey: () => config.storeId,
120
- // x-store-key header
121
- accessToken: () => getAuthToken() || ""
122
- // Bearer token
123
- });
124
- return apiConfiguration;
125
- }
126
- function getApiConfiguration() {
127
- if (!apiConfiguration) {
128
- throw new Error("API adapter not initialized. Call initializeApiAdapter first.");
129
- }
130
- return apiConfiguration;
131
- }
132
- function getCurrentConfig() {
133
- if (!currentConfig) {
134
- throw new Error("API adapter not initialized.");
135
- }
136
- return currentConfig;
137
- }
138
- var TOKEN_KEY = "ecommerce_access_token";
139
- function setAuthToken(token) {
140
- if (typeof window !== "undefined") {
141
- localStorage.setItem(TOKEN_KEY, token);
142
- if (apiConfiguration) {
143
- apiConfiguration.accessToken = () => token;
144
- }
145
- }
146
- }
147
- function getAuthToken() {
148
- if (typeof window !== "undefined") {
149
- return localStorage.getItem(TOKEN_KEY);
150
- }
151
- return null;
152
- }
153
- function clearAuthToken() {
154
- if (typeof window !== "undefined") {
155
- localStorage.removeItem(TOKEN_KEY);
156
- if (apiConfiguration) {
157
- apiConfiguration.accessToken = () => "";
158
- }
159
- }
160
- }
204
+ // src/providers/AuthProvider.tsx
205
+ init_config();
161
206
  var BASE_PATH = "/".replace(/\/+$/, "");
162
207
  var BaseAPI = class {
163
208
  constructor(configuration, basePath = BASE_PATH, axios = globalAxios4) {
@@ -1896,7 +1941,17 @@ function useAuth() {
1896
1941
  function AuthProvider({ children }) {
1897
1942
  const [user, setUser] = useState(null);
1898
1943
  const [isLoading, setIsLoading] = useState(true);
1899
- const USER_KEY = "ecommerce_user";
1944
+ const getUserKey = () => {
1945
+ if (typeof window === "undefined") return "ecommerce_user";
1946
+ const token = getAuthToken();
1947
+ if (!token) return "ecommerce_user";
1948
+ try {
1949
+ const config = (init_config(), __toCommonJS(config_exports)).getCurrentConfig();
1950
+ return `ecommerce_user_${config?.storeId || "default"}`;
1951
+ } catch {
1952
+ return "ecommerce_user";
1953
+ }
1954
+ };
1900
1955
  const refreshUser = useCallback(async () => {
1901
1956
  try {
1902
1957
  const token = getAuthToken();
@@ -1914,7 +1969,8 @@ function AuthProvider({ children }) {
1914
1969
  useEffect(() => {
1915
1970
  if (typeof window !== "undefined") {
1916
1971
  try {
1917
- const cached = localStorage.getItem(USER_KEY);
1972
+ const userKey = getUserKey();
1973
+ const cached = localStorage.getItem(userKey);
1918
1974
  if (cached) {
1919
1975
  const parsed = JSON.parse(cached);
1920
1976
  setUser(parsed);
@@ -1934,7 +1990,7 @@ function AuthProvider({ children }) {
1934
1990
  }
1935
1991
  setUser(response.data.userData);
1936
1992
  if (typeof window !== "undefined") {
1937
- localStorage.setItem(USER_KEY, JSON.stringify(response.data.userData));
1993
+ localStorage.setItem(getUserKey(), JSON.stringify(response.data.userData));
1938
1994
  }
1939
1995
  return response.data;
1940
1996
  } finally {
@@ -1950,7 +2006,7 @@ function AuthProvider({ children }) {
1950
2006
  }
1951
2007
  setUser(response.data.userData);
1952
2008
  if (typeof window !== "undefined") {
1953
- localStorage.setItem(USER_KEY, JSON.stringify(response.data.userData));
2009
+ localStorage.setItem(getUserKey(), JSON.stringify(response.data.userData));
1954
2010
  }
1955
2011
  return response.data;
1956
2012
  } finally {
@@ -1963,7 +2019,7 @@ function AuthProvider({ children }) {
1963
2019
  clearAuthToken();
1964
2020
  setUser(null);
1965
2021
  if (typeof window !== "undefined") {
1966
- localStorage.removeItem(USER_KEY);
2022
+ localStorage.removeItem(getUserKey());
1967
2023
  }
1968
2024
  } finally {
1969
2025
  setIsLoading(false);
@@ -1992,7 +2048,7 @@ function AuthProvider({ children }) {
1992
2048
  updateUser,
1993
2049
  refreshUser
1994
2050
  };
1995
- return /* @__PURE__ */ React19.createElement(AuthContext.Provider, { value }, children);
2051
+ return /* @__PURE__ */ React20.createElement(AuthContext.Provider, { value }, children);
1996
2052
  }
1997
2053
  var AddressesApiAxiosParamCreator = function(configuration) {
1998
2054
  return {
@@ -6660,6 +6716,9 @@ var WishlistApi = class extends BaseAPI {
6660
6716
  }
6661
6717
  };
6662
6718
 
6719
+ // src/lib/Apis/index.ts
6720
+ init_configuration();
6721
+
6663
6722
  // src/lib/Apis/models/manual-order-dto.ts
6664
6723
  var ManualOrderDTOOrderStatusEnum = /* @__PURE__ */ ((ManualOrderDTOOrderStatusEnum2) => {
6665
6724
  ManualOrderDTOOrderStatusEnum2["Pending"] = "Pending";
@@ -6696,6 +6755,9 @@ var PaymentPaymentStatusEnum = /* @__PURE__ */ ((PaymentPaymentStatusEnum2) => {
6696
6755
  return PaymentPaymentStatusEnum2;
6697
6756
  })(PaymentPaymentStatusEnum || {});
6698
6757
 
6758
+ // src/lib/api-adapter/index.ts
6759
+ init_config();
6760
+
6699
6761
  // src/providers/CartProvider.tsx
6700
6762
  var CartContext = createContext(void 0);
6701
6763
  function useCart() {
@@ -6782,8 +6844,13 @@ function CartProvider({ children }) {
6782
6844
  clearCart,
6783
6845
  refreshCart
6784
6846
  };
6785
- return /* @__PURE__ */ React19.createElement(CartContext.Provider, { value }, children);
6847
+ return /* @__PURE__ */ React20.createElement(CartContext.Provider, { value }, children);
6786
6848
  }
6849
+
6850
+ // src/lib/Apis/wrapper.ts
6851
+ init_configuration();
6852
+ init_config();
6853
+ init_config();
6787
6854
  var BaseUrl = "https://api.heypharmacist.com";
6788
6855
  globalAxios4.interceptors.request.use(async (config) => {
6789
6856
  if (!config?.headers) {
@@ -6917,7 +6984,7 @@ function WishlistProvider({ children }) {
6917
6984
  const refreshWishlist = async () => {
6918
6985
  await fetchWishlist();
6919
6986
  };
6920
- return /* @__PURE__ */ React19.createElement(
6987
+ return /* @__PURE__ */ React20.createElement(
6921
6988
  WishlistContext.Provider,
6922
6989
  {
6923
6990
  value: {
@@ -6940,14 +7007,31 @@ var useWishlist = () => {
6940
7007
  }
6941
7008
  return context;
6942
7009
  };
6943
- function EcommerceProvider({ config, children, withToaster = true }) {
7010
+ var BasePathContext = createContext(void 0);
7011
+ function BasePathProvider({ basePath = "", children }) {
7012
+ const normalized = basePath ? basePath.startsWith("/") ? basePath : `/${basePath}` : "";
7013
+ const buildPath = (path) => {
7014
+ if (!normalized) return path;
7015
+ if (!path) return normalized;
7016
+ if (path.startsWith(normalized + "/")) return path;
7017
+ if (path.startsWith("/")) return `${normalized}${path}`;
7018
+ return `${normalized}/${path}`;
7019
+ };
7020
+ return /* @__PURE__ */ React20.createElement(BasePathContext.Provider, { value: { basePath: normalized, buildPath } }, children);
7021
+ }
7022
+ function useBasePath() {
7023
+ const ctx = useContext(BasePathContext);
7024
+ if (!ctx) throw new Error("useBasePath must be used within BasePathProvider");
7025
+ return ctx;
7026
+ }
7027
+ function EcommerceProvider({ config, children, withToaster = true, basePath = "" }) {
6944
7028
  useEffect(() => {
6945
7029
  initializeApiAdapter(config);
6946
7030
  }, [config]);
6947
- const [client] = React19.useState(
7031
+ const [client] = React20.useState(
6948
7032
  new QueryClient({ defaultOptions: { queries: { staleTime: 5e3 } } })
6949
7033
  );
6950
- return /* @__PURE__ */ React19.createElement(QueryClientProvider, { client }, /* @__PURE__ */ React19.createElement(ThemeProvider, { config }, /* @__PURE__ */ React19.createElement(AuthProvider, null, /* @__PURE__ */ React19.createElement(CartProvider, null, /* @__PURE__ */ React19.createElement(WishlistProvider, null, children, withToaster && /* @__PURE__ */ React19.createElement(Toaster, { position: "top-right", richColors: true }))))));
7034
+ return /* @__PURE__ */ React20.createElement(QueryClientProvider, { client }, /* @__PURE__ */ React20.createElement(ThemeProvider, { config }, /* @__PURE__ */ React20.createElement(BasePathProvider, { basePath }, /* @__PURE__ */ React20.createElement(AuthProvider, null, /* @__PURE__ */ React20.createElement(CartProvider, null, /* @__PURE__ */ React20.createElement(WishlistProvider, null, children, withToaster && /* @__PURE__ */ React20.createElement(Toaster, { position: "top-right", richColors: true })))))));
6951
7035
  }
6952
7036
 
6953
7037
  // src/lib/utils/format.ts
@@ -6990,6 +7074,7 @@ function ProductCard({
6990
7074
  className
6991
7075
  }) {
6992
7076
  const router = useRouter();
7077
+ const { buildPath } = useBasePath();
6993
7078
  const [isFavorite, setIsFavorite] = useState(isFavorited);
6994
7079
  const { addToWishlist, removeFromWishlist, isInWishlist } = useWishlist();
6995
7080
  const [isHovered, setIsHovered] = useState(false);
@@ -7036,7 +7121,7 @@ function ProductCard({
7036
7121
  alt: product.name || "Product image"
7037
7122
  };
7038
7123
  }, [product.productMedia, product.name]);
7039
- return /* @__PURE__ */ React19.createElement(
7124
+ return /* @__PURE__ */ React20.createElement(
7040
7125
  motion.article,
7041
7126
  {
7042
7127
  className: "relative group bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100 hover:border-gray-200 flex h-[420px] flex-col",
@@ -7049,7 +7134,7 @@ function ProductCard({
7049
7134
  onClick: handleCardClick,
7050
7135
  onKeyDown: handleKeyDown
7051
7136
  },
7052
- /* @__PURE__ */ React19.createElement("div", { className: "relative h-48 w-full overflow-hidden bg-gray-50" }, /* @__PURE__ */ React19.createElement(AnimatePresence, null, !isImageLoaded && /* @__PURE__ */ React19.createElement(
7137
+ /* @__PURE__ */ React20.createElement("div", { className: "relative h-48 w-full overflow-hidden bg-gray-50" }, /* @__PURE__ */ React20.createElement(AnimatePresence, null, !isImageLoaded && /* @__PURE__ */ React20.createElement(
7053
7138
  motion.div,
7054
7139
  {
7055
7140
  className: "absolute inset-0 bg-gray-200 animate-pulse",
@@ -7057,7 +7142,7 @@ function ProductCard({
7057
7142
  exit: { opacity: 0 },
7058
7143
  transition: { duration: 0.2 }
7059
7144
  }
7060
- )), product.productMedia?.[0]?.file && /* @__PURE__ */ React19.createElement(
7145
+ )), product.productMedia?.[0]?.file && /* @__PURE__ */ React20.createElement(
7061
7146
  Image3,
7062
7147
  {
7063
7148
  src: product.productMedia?.[0]?.file || "/placeholder-product.jpg",
@@ -7068,7 +7153,7 @@ function ProductCard({
7068
7153
  priority: false,
7069
7154
  onLoad: handleImageLoad
7070
7155
  }
7071
- ), /* @__PURE__ */ React19.createElement("div", { className: "absolute top-3 left-3 flex flex-col gap-2 z-10" }, product.isDiscounted && /* @__PURE__ */ React19.createElement(
7156
+ ), /* @__PURE__ */ React20.createElement("div", { className: "absolute top-3 left-3 flex flex-col gap-2 z-10" }, product.isDiscounted && /* @__PURE__ */ React20.createElement(
7072
7157
  motion.span,
7073
7158
  {
7074
7159
  initial: { scale: 0.9, opacity: 0 },
@@ -7078,7 +7163,7 @@ function ProductCard({
7078
7163
  "-",
7079
7164
  product.discountAmount,
7080
7165
  "%"
7081
- ), product.inventoryCount === 0 && /* @__PURE__ */ React19.createElement(
7166
+ ), product.inventoryCount === 0 && /* @__PURE__ */ React20.createElement(
7082
7167
  motion.span,
7083
7168
  {
7084
7169
  initial: { scale: 0.9, opacity: 0 },
@@ -7086,7 +7171,7 @@ function ProductCard({
7086
7171
  className: "inline-flex items-center justify-center px-2.5 py-1 rounded-full text-xs font-bold text-white bg-red-600"
7087
7172
  },
7088
7173
  "Out of Stock"
7089
- )), showFavoriteButton && /* @__PURE__ */ React19.createElement(
7174
+ )), showFavoriteButton && /* @__PURE__ */ React20.createElement(
7090
7175
  motion.button,
7091
7176
  {
7092
7177
  type: "button",
@@ -7096,10 +7181,10 @@ function ProductCard({
7096
7181
  whileTap: { scale: 0.95 },
7097
7182
  "aria-label": isFavorite ? "Remove from wishlist" : "Add to wishlist"
7098
7183
  },
7099
- /* @__PURE__ */ React19.createElement(Heart, { className: `w-5 h-5 ${isFavorite ? "fill-current" : ""}` })
7184
+ /* @__PURE__ */ React20.createElement(Heart, { className: `w-5 h-5 ${isFavorite ? "fill-current" : ""}` })
7100
7185
  )),
7101
- /* @__PURE__ */ React19.createElement("div", { className: "absolute top-4 left-4 flex flex-col gap-2" }, product.inventoryCount === 0 && /* @__PURE__ */ React19.createElement("span", { className: "px-3 py-1 rounded-full text-sm font-bold bg-red-100 text-red-800" }, "Out of Stock")),
7102
- showFavoriteButton && /* @__PURE__ */ React19.createElement(
7186
+ /* @__PURE__ */ React20.createElement("div", { className: "absolute top-4 left-4 flex flex-col gap-2" }, product.inventoryCount === 0 && /* @__PURE__ */ React20.createElement("span", { className: "px-3 py-1 rounded-full text-sm font-bold bg-red-100 text-red-800" }, "Out of Stock")),
7187
+ showFavoriteButton && /* @__PURE__ */ React20.createElement(
7103
7188
  "button",
7104
7189
  {
7105
7190
  type: "button",
@@ -7107,21 +7192,21 @@ function ProductCard({
7107
7192
  className: `absolute top-2 right-2 p-2 rounded-full transition-colors ${isFavorite ? "text-red-500" : "text-gray-400 hover:text-red-500"}`,
7108
7193
  "aria-label": isFavorite ? "Remove from wishlist" : "Add to wishlist"
7109
7194
  },
7110
- /* @__PURE__ */ React19.createElement(Heart, { className: `w-5 h-5 ${isFavorite ? "fill-current" : ""}` })
7195
+ /* @__PURE__ */ React20.createElement(Heart, { className: `w-5 h-5 ${isFavorite ? "fill-current" : ""}` })
7111
7196
  ),
7112
- /* @__PURE__ */ React19.createElement("div", { className: "p-4" }, product.parentCategories && product.parentCategories?.length > 0 && /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-gray-500 uppercase tracking-wider mb-2" }, product.parentCategories?.map((category) => category?.name).join(", ") || "No categories"), /* @__PURE__ */ React19.createElement("div", { className: "mb-2" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900 line-clamp-1 group-hover:text-primary-600 transition-colors" }, product.name), product?.sku && /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-gray-400 mt-1" }, "SKU: ", product.sku)), /* @__PURE__ */ React19.createElement("div", { className: "flex items-baseline gap-2" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React19.createElement("span", { className: "text-2xl font-bold text-gray-900" }, formatPrice(product.finalPrice)), product.inventoryCount > 0 && /* @__PURE__ */ React19.createElement("span", { className: "text-xs text-gray-500" }, product.inventoryCount > 0 ? "In Stock" : "Out of Stock")), product.priceBeforeDiscount && product.priceBeforeDiscount > product.finalPrice && /* @__PURE__ */ React19.createElement("span", { className: "text-sm text-gray-500 line-through" }, formatPrice(product.priceBeforeDiscount)))),
7113
- /* @__PURE__ */ React19.createElement("div", { className: "mt-auto p-4 pt-0" }, /* @__PURE__ */ React19.createElement(
7197
+ /* @__PURE__ */ React20.createElement("div", { className: "p-4" }, product.parentCategories && product.parentCategories?.length > 0 && /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-gray-500 uppercase tracking-wider mb-2" }, product.parentCategories?.map((category) => category?.name).join(", ") || "No categories"), /* @__PURE__ */ React20.createElement("div", { className: "mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900 line-clamp-1 group-hover:text-primary-600 transition-colors" }, product.name), product?.sku && /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-gray-400 mt-1" }, "SKU: ", product.sku)), /* @__PURE__ */ React20.createElement("div", { className: "flex items-baseline gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React20.createElement("span", { className: "text-2xl font-bold text-gray-900" }, formatPrice(product.finalPrice)), product.inventoryCount > 0 && /* @__PURE__ */ React20.createElement("span", { className: "text-xs text-gray-500" }, product.inventoryCount > 0 ? "In Stock" : "Out of Stock")), product.priceBeforeDiscount && product.priceBeforeDiscount > product.finalPrice && /* @__PURE__ */ React20.createElement("span", { className: "text-sm text-gray-500 line-through" }, formatPrice(product.priceBeforeDiscount)))),
7198
+ /* @__PURE__ */ React20.createElement("div", { className: "mt-auto p-4 pt-0" }, /* @__PURE__ */ React20.createElement(
7114
7199
  "button",
7115
7200
  {
7116
7201
  type: "button",
7117
7202
  onClick: (e) => {
7118
7203
  e.stopPropagation();
7119
- router.push(`/products/${product._id}`);
7204
+ router.push(buildPath(`/products/${product._id}`));
7120
7205
  },
7121
7206
  className: `w-full flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium bg-primary-600 hover:bg-primary-700 text-white`
7122
7207
  },
7123
7208
  "View Product"
7124
- ), showFavoriteButton && /* @__PURE__ */ React19.createElement(
7209
+ ), showFavoriteButton && /* @__PURE__ */ React20.createElement(
7125
7210
  "button",
7126
7211
  {
7127
7212
  type: "button",
@@ -7129,7 +7214,7 @@ function ProductCard({
7129
7214
  className: "mt-2 w-full flex items-center justify-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium text-primary-600 hover:bg-gray-50",
7130
7215
  "aria-label": isFavorite ? "Remove from wishlist" : "Add to wishlist"
7131
7216
  },
7132
- /* @__PURE__ */ React19.createElement(
7217
+ /* @__PURE__ */ React20.createElement(
7133
7218
  Heart,
7134
7219
  {
7135
7220
  className: `mr-2 h-4 w-4 ${isFavorite ? "fill-red-500 text-red-500" : "text-primary-600"}`
@@ -7140,13 +7225,13 @@ function ProductCard({
7140
7225
  );
7141
7226
  }
7142
7227
  function Skeleton({ className = "" }) {
7143
- return /* @__PURE__ */ React19.createElement("div", { className: `animate-pulse bg-gradient-to-r from-gray-200 via-gray-300 to-gray-200 bg-[length:200%_100%] rounded ${className}` });
7228
+ return /* @__PURE__ */ React20.createElement("div", { className: `animate-pulse bg-gradient-to-r from-gray-200 via-gray-300 to-gray-200 bg-[length:200%_100%] rounded ${className}` });
7144
7229
  }
7145
7230
  function ProductCardSkeleton() {
7146
- return /* @__PURE__ */ React19.createElement("div", { className: "bg-white rounded-2xl overflow-hidden shadow-sm" }, /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-64 w-full" }), /* @__PURE__ */ React19.createElement("div", { className: "p-4 space-y-3" }, /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-6 w-3/4" }), /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-4 w-1/2" }), /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-center pt-2" }, /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-8 w-24" }), /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-10 w-10 rounded-full" }))));
7231
+ return /* @__PURE__ */ React20.createElement("div", { className: "bg-white rounded-2xl overflow-hidden shadow-sm" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-64 w-full" }), /* @__PURE__ */ React20.createElement("div", { className: "p-4 space-y-3" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-6 w-3/4" }), /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-4 w-1/2" }), /* @__PURE__ */ React20.createElement("div", { className: "flex justify-between items-center pt-2" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-8 w-24" }), /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-10 w-10 rounded-full" }))));
7147
7232
  }
7148
7233
  function OrderCardSkeleton() {
7149
- return /* @__PURE__ */ React19.createElement("div", { className: "bg-white rounded-2xl p-6 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-start mb-4" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-2 flex-1" }, /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-6 w-32" }), /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-4 w-48" })), /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-6 w-20 rounded-full" })), /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React19.createElement(Skeleton, { className: "h-4 w-2/3" })));
7234
+ return /* @__PURE__ */ React20.createElement("div", { className: "bg-white rounded-2xl p-6 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "flex justify-between items-start mb-4" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-2 flex-1" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-6 w-32" }), /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-4 w-48" })), /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-6 w-20 rounded-full" })), /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React20.createElement(Skeleton, { className: "h-4 w-2/3" })));
7150
7235
  }
7151
7236
  var MotionDiv = dynamic(() => import('framer-motion').then((mod) => mod.motion.div), {
7152
7237
  ssr: false
@@ -7172,14 +7257,14 @@ function Button({
7172
7257
  md: "px-6 py-3 text-base",
7173
7258
  lg: "px-8 py-4 text-lg"
7174
7259
  };
7175
- return /* @__PURE__ */ React19.createElement(
7260
+ return /* @__PURE__ */ React20.createElement(
7176
7261
  MotionDiv,
7177
7262
  {
7178
7263
  whileHover: { scale: 1.02 },
7179
7264
  whileTap: { scale: 0.98 },
7180
7265
  className: "inline-block"
7181
7266
  },
7182
- /* @__PURE__ */ React19.createElement(
7267
+ /* @__PURE__ */ React20.createElement(
7183
7268
  "button",
7184
7269
  {
7185
7270
  className: `${baseStyles} ${variants[variant]} ${sizes[size]} ${className}`,
@@ -7188,18 +7273,18 @@ function Button({
7188
7273
  "aria-busy": isLoading,
7189
7274
  ...props
7190
7275
  },
7191
- isLoading ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("svg", { className: "animate-spin h-5 w-5", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true" }, /* @__PURE__ */ React19.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React19.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })), "Loading...") : children
7276
+ isLoading ? /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("svg", { className: "animate-spin h-5 w-5", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React20.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })), "Loading...") : children
7192
7277
  )
7193
7278
  );
7194
7279
  }
7195
7280
 
7196
7281
  // src/components/EmptyState.tsx
7197
7282
  function EmptyState({ icon: Icon, title, description, actionLabel, onAction }) {
7198
- return /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center justify-center py-16 px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mb-6" }, /* @__PURE__ */ React19.createElement(Icon, { className: "w-12 h-12 text-gray-400" })), /* @__PURE__ */ React19.createElement("h3", { className: "text-2xl font-bold text-gray-900 mb-2" }, title), /* @__PURE__ */ React19.createElement("p", { className: "text-gray-600 text-center max-w-md mb-8" }, description), actionLabel && onAction && /* @__PURE__ */ React19.createElement(Button, { onClick: onAction }, actionLabel));
7283
+ return /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col items-center justify-center py-16 px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mb-6" }, /* @__PURE__ */ React20.createElement(Icon, { className: "w-12 h-12 text-gray-400" })), /* @__PURE__ */ React20.createElement("h3", { className: "text-2xl font-bold text-gray-900 mb-2" }, title), /* @__PURE__ */ React20.createElement("p", { className: "text-gray-600 text-center max-w-md mb-8" }, description), actionLabel && onAction && /* @__PURE__ */ React20.createElement(Button, { onClick: onAction }, actionLabel));
7199
7284
  }
7200
7285
  var Input = forwardRef(
7201
7286
  ({ label, error, helperText, className = "", ...props }, ref) => {
7202
- return /* @__PURE__ */ React19.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React19.createElement("label", { className: "block text-sm font-medium text-gray-700 mb-2" }, label), /* @__PURE__ */ React19.createElement(
7287
+ return /* @__PURE__ */ React20.createElement("div", { className: "w-full" }, label && /* @__PURE__ */ React20.createElement("label", { className: "block text-sm font-medium text-gray-700 mb-2" }, label), /* @__PURE__ */ React20.createElement(
7203
7288
  "input",
7204
7289
  {
7205
7290
  ref,
@@ -7213,7 +7298,7 @@ var Input = forwardRef(
7213
7298
  `,
7214
7299
  ...props
7215
7300
  }
7216
- ), error && /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-sm text-red-600" }, error), helperText && !error && /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-sm text-gray-500" }, helperText));
7301
+ ), error && /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-sm text-red-600" }, error), helperText && !error && /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-sm text-gray-500" }, helperText));
7217
7302
  }
7218
7303
  );
7219
7304
  Input.displayName = "Input";
@@ -7333,6 +7418,7 @@ function useCategories() {
7333
7418
  // src/screens/ShopScreen.tsx
7334
7419
  function ShopScreen({ initialFilters = {}, categoryName }) {
7335
7420
  const router = useRouter();
7421
+ const { buildPath } = useBasePath();
7336
7422
  const [filters, setFilters] = useState(initialFilters);
7337
7423
  const [page, setPage] = useState(1);
7338
7424
  const [showFilters, setShowFilters] = useState(false);
@@ -7352,7 +7438,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7352
7438
  e.preventDefault();
7353
7439
  if (searchQuery.trim()) {
7354
7440
  setIsSearching(true);
7355
- router.push(`/search?q=${encodeURIComponent(searchQuery.trim())}`);
7441
+ router.push(buildPath(`/search?q=${encodeURIComponent(searchQuery.trim())}`));
7356
7442
  }
7357
7443
  };
7358
7444
  const handleInputChange = (e) => {
@@ -7362,7 +7448,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7362
7448
  if (e.key === "Enter" && searchQuery.trim()) {
7363
7449
  e.preventDefault();
7364
7450
  setIsSearching(true);
7365
- router.push(`/search?q=${encodeURIComponent(searchQuery.trim())}`);
7451
+ router.push(buildPath(`/search?q=${encodeURIComponent(searchQuery.trim())}`));
7366
7452
  }
7367
7453
  };
7368
7454
  const priceRanges = useMemo(
@@ -7774,7 +7860,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7774
7860
  ]);
7775
7861
  const hasActiveFilters = activeFilterChips.length > 0;
7776
7862
  const isCustomPriceDirty = customPrice.min.trim() !== "" || customPrice.max.trim() !== "";
7777
- const renderFiltersPanel = () => /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, "Refine results"), /* @__PURE__ */ React19.createElement("p", { className: "mt-1 text-sm text-gray-500" }, "Filter by category, price, and availability to find the perfect fit faster.")), hasActiveFilters && /* @__PURE__ */ React19.createElement(
7863
+ const renderFiltersPanel = () => /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, "Refine results"), /* @__PURE__ */ React20.createElement("p", { className: "mt-1 text-sm text-gray-500" }, "Filter by category, price, and availability to find the perfect fit faster.")), hasActiveFilters && /* @__PURE__ */ React20.createElement(
7778
7864
  "button",
7779
7865
  {
7780
7866
  type: "button",
@@ -7782,10 +7868,10 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7782
7868
  className: "text-sm font-semibold text-primary-600 hover:text-primary-700"
7783
7869
  },
7784
7870
  "Clear all"
7785
- )), /* @__PURE__ */ React19.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Categories"), /* @__PURE__ */ React19.createElement("div", { className: "space-y-2" }, sortedCategories.length === 0 && /* @__PURE__ */ React19.createElement("span", { className: "text-sm text-gray-500" }, "No categories available yet."), sortedCategories.map((category) => {
7871
+ )), /* @__PURE__ */ React20.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Categories"), /* @__PURE__ */ React20.createElement("div", { className: "space-y-2" }, sortedCategories.length === 0 && /* @__PURE__ */ React20.createElement("span", { className: "text-sm text-gray-500" }, "No categories available yet."), sortedCategories.map((category) => {
7786
7872
  const isCategoryActive = categoryFilter === category.id;
7787
7873
  const isExpanded = !!expandedCategories[category.id];
7788
- return /* @__PURE__ */ React19.createElement("div", { key: category.id, className: "rounded-xl border-gray-100 bg-white/50" }, /* @__PURE__ */ React19.createElement(
7874
+ return /* @__PURE__ */ React20.createElement("div", { key: category.id, className: "rounded-xl border-gray-100 bg-white/50" }, /* @__PURE__ */ React20.createElement(
7789
7875
  "div",
7790
7876
  {
7791
7877
  role: "button",
@@ -7796,8 +7882,8 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7796
7882
  },
7797
7883
  className: `flex w-full items-center justify-between rounded-xl px-3 py-2 text-sm font-medium transition ${isCategoryActive ? "text-primary-700 bg-primary-50" : "text-gray-700 hover:text-primary-700 hover:bg-primary-50/50"}`
7798
7884
  },
7799
- /* @__PURE__ */ React19.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("span", { className: "font-medium" }, category.name), category.productCount > 0 && /* @__PURE__ */ React19.createElement("span", { className: `ml-1 rounded-full bg-gray-100 px-2 py-0.5 text-xs ${isCategoryActive ? "text-primary-700" : "text-gray-500"}` }, category.productCount)),
7800
- /* @__PURE__ */ React19.createElement(
7885
+ /* @__PURE__ */ React20.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("span", { className: "font-medium" }, category.name), category.productCount > 0 && /* @__PURE__ */ React20.createElement("span", { className: `ml-1 rounded-full bg-gray-100 px-2 py-0.5 text-xs ${isCategoryActive ? "text-primary-700" : "text-gray-500"}` }, category.productCount)),
7886
+ /* @__PURE__ */ React20.createElement(
7801
7887
  "button",
7802
7888
  {
7803
7889
  type: "button",
@@ -7809,11 +7895,11 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7809
7895
  className: "rounded-md p-1 hover:bg-gray-100",
7810
7896
  "aria-label": isExpanded ? "Collapse" : "Expand"
7811
7897
  },
7812
- /* @__PURE__ */ React19.createElement(ChevronDown, { className: `h-4 w-4 transition-transform ${isExpanded ? "rotate-180 text-primary-600" : "rotate-0 text-gray-400"}` })
7898
+ /* @__PURE__ */ React20.createElement(ChevronDown, { className: `h-4 w-4 transition-transform ${isExpanded ? "rotate-180 text-primary-600" : "rotate-0 text-gray-400"}` })
7813
7899
  )
7814
- ), isExpanded && Array.isArray(category.categorySubCategories) && category.categorySubCategories.length > 0 && /* @__PURE__ */ React19.createElement("div", { className: "mt-1 border-gray-100 px-2 pb-2 pl-4" }, /* @__PURE__ */ React19.createElement("div", { className: "divide-y divide-gray-100" }, category.categorySubCategories.map((sub) => {
7900
+ ), isExpanded && Array.isArray(category.categorySubCategories) && category.categorySubCategories.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "mt-1 border-gray-100 px-2 pb-2 pl-4" }, /* @__PURE__ */ React20.createElement("div", { className: "divide-y divide-gray-100" }, category.categorySubCategories.map((sub) => {
7815
7901
  const isSubActive = subCategoryFilter === sub.id;
7816
- return /* @__PURE__ */ React19.createElement(
7902
+ return /* @__PURE__ */ React20.createElement(
7817
7903
  "button",
7818
7904
  {
7819
7905
  key: sub.id,
@@ -7824,9 +7910,9 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7824
7910
  sub.name
7825
7911
  );
7826
7912
  }))));
7827
- }))))), /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React19.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Price"), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2" }, priceRanges.map((range) => {
7913
+ }))))), /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React20.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Price"), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2" }, priceRanges.map((range) => {
7828
7914
  const isActive = selectedPriceRange === range.value;
7829
- return /* @__PURE__ */ React19.createElement(
7915
+ return /* @__PURE__ */ React20.createElement(
7830
7916
  "button",
7831
7917
  {
7832
7918
  type: "button",
@@ -7836,7 +7922,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7836
7922
  },
7837
7923
  range.label
7838
7924
  );
7839
- })), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-2 gap-3" }, /* @__PURE__ */ React19.createElement(
7925
+ })), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-3" }, /* @__PURE__ */ React20.createElement(
7840
7926
  Input,
7841
7927
  {
7842
7928
  type: "number",
@@ -7845,7 +7931,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7845
7931
  value: customPrice.min,
7846
7932
  onChange: (event) => setCustomPrice((current) => ({ ...current, min: event.target.value }))
7847
7933
  }
7848
- ), /* @__PURE__ */ React19.createElement(
7934
+ ), /* @__PURE__ */ React20.createElement(
7849
7935
  Input,
7850
7936
  {
7851
7937
  type: "number",
@@ -7854,7 +7940,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7854
7940
  value: customPrice.max,
7855
7941
  onChange: (event) => setCustomPrice((current) => ({ ...current, max: event.target.value }))
7856
7942
  }
7857
- )), /* @__PURE__ */ React19.createElement(
7943
+ )), /* @__PURE__ */ React20.createElement(
7858
7944
  "button",
7859
7945
  {
7860
7946
  type: "button",
@@ -7863,48 +7949,48 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7863
7949
  className: "w-full rounded-xl border border-primary-500 bg-primary-500/10 px-4 py-2.5 text-sm font-semibold text-primary-700 transition hover:bg-primary-500/20 disabled:cursor-not-allowed disabled:border-gray-200 disabled:text-gray-400"
7864
7950
  },
7865
7951
  "Apply price range"
7866
- )), /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Availability"), /* @__PURE__ */ React19.createElement(
7952
+ )), /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("h4", { className: "text-xs font-semibold uppercase tracking-[0.2em] text-gray-500" }, "Availability"), /* @__PURE__ */ React20.createElement(
7867
7953
  "button",
7868
7954
  {
7869
7955
  type: "button",
7870
7956
  onClick: handleToggleStock,
7871
7957
  className: `flex w-full items-center justify-between rounded-xl border px-4 py-3 text-sm font-medium transition ${inStockOnly ? "border-primary-500 bg-primary-50 text-primary-700" : "border-gray-200 bg-white text-gray-600 hover:border-primary-300 hover:text-primary-600"}`
7872
7958
  },
7873
- /* @__PURE__ */ React19.createElement("span", null, "In stock only"),
7874
- /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" })
7875
- ), /* @__PURE__ */ React19.createElement(
7959
+ /* @__PURE__ */ React20.createElement("span", null, "In stock only"),
7960
+ /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" })
7961
+ ), /* @__PURE__ */ React20.createElement(
7876
7962
  "button",
7877
7963
  {
7878
7964
  type: "button",
7879
7965
  onClick: handleToggleNewArrivals,
7880
7966
  className: `mt-2 flex w-full items-center justify-between rounded-xl border px-4 py-3 text-sm font-medium transition ${newArrivals ? "border-secondary-500 bg-secondary-50 text-secondary-700" : "border-gray-200 bg-white text-gray-600 hover:border-secondary-300 hover:text-secondary-600"}`
7881
7967
  },
7882
- /* @__PURE__ */ React19.createElement("span", null, "New arrivals (last 30 days)"),
7883
- /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4 text-secondary-500" })
7968
+ /* @__PURE__ */ React20.createElement("span", null, "New arrivals (last 30 days)"),
7969
+ /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4 text-secondary-500" })
7884
7970
  ))));
7885
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React19.createElement(
7971
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React20.createElement(
7886
7972
  "div",
7887
7973
  {
7888
7974
  className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]",
7889
7975
  "aria-hidden": "true"
7890
7976
  }
7891
- ), /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,_rgba(94,234,212,0.35),_transparent_55%)] opacity-60" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-24" }, /* @__PURE__ */ React19.createElement(
7977
+ ), /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,_rgba(94,234,212,0.35),_transparent_55%)] opacity-60" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-24" }, /* @__PURE__ */ React20.createElement(
7892
7978
  motion.div,
7893
7979
  {
7894
7980
  initial: { opacity: 0, y: 24 },
7895
7981
  animate: { opacity: 1, y: 0 },
7896
7982
  className: "max-w-3xl space-y-8 text-center md:mx-auto md:text-left"
7897
7983
  },
7898
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-2 text-sm font-semibold tracking-wide text-white/80 backdrop-blur" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4" }), "Wellness products, curated for you"),
7899
- /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-6xl" }, "Find pharmacy favorites crafted to keep your family thriving"),
7900
- /* @__PURE__ */ React19.createElement("p", { className: "text-lg text-white/80 md:text-xl" }, "Explore a modern storefront with real-time inventory, smart filters, and rich product details designed to make healthier choices easier."),
7901
- /* @__PURE__ */ React19.createElement(
7984
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-2 text-sm font-semibold tracking-wide text-white/80 backdrop-blur" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4" }), "Wellness products, curated for you"),
7985
+ /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-6xl" }, "Find pharmacy favorites crafted to keep your family thriving"),
7986
+ /* @__PURE__ */ React20.createElement("p", { className: "text-lg text-white/80 md:text-xl" }, "Explore a modern storefront with real-time inventory, smart filters, and rich product details designed to make healthier choices easier."),
7987
+ /* @__PURE__ */ React20.createElement(
7902
7988
  "form",
7903
7989
  {
7904
7990
  onSubmit: handleSearch,
7905
7991
  className: "mx-auto max-w-2xl md:mx-0"
7906
7992
  },
7907
- /* @__PURE__ */ React19.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React19.createElement(
7993
+ /* @__PURE__ */ React20.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React20.createElement(
7908
7994
  "input",
7909
7995
  {
7910
7996
  type: "search",
@@ -7915,17 +8001,17 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7915
8001
  className: "flex h-12 w-full rounded-xl border border-white/20 bg-white/10 px-4 py-2 pr-14 text-lg text-white placeholder-white/60 shadow-2xl shadow-primary-900/20 backdrop-blur focus:border-white/30 focus:outline-none focus:ring-2 focus:ring-white/20 disabled:opacity-50",
7916
8002
  disabled: isSearching
7917
8003
  }
7918
- ), /* @__PURE__ */ React19.createElement(
8004
+ ), /* @__PURE__ */ React20.createElement(
7919
8005
  "button",
7920
8006
  {
7921
8007
  type: "submit",
7922
8008
  className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-xl bg-white/20 p-3 text-white transition hover:bg-white/30 disabled:opacity-50",
7923
8009
  disabled: !searchQuery.trim() || isSearching
7924
8010
  },
7925
- isSearching ? /* @__PURE__ */ React19.createElement("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-white border-t-transparent" }) : /* @__PURE__ */ React19.createElement(Search, { className: "h-5 w-5" })
8011
+ isSearching ? /* @__PURE__ */ React20.createElement("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-white border-t-transparent" }) : /* @__PURE__ */ React20.createElement(Search, { className: "h-5 w-5" })
7926
8012
  ))
7927
8013
  )
7928
- ), /* @__PURE__ */ React19.createElement(
8014
+ ), /* @__PURE__ */ React20.createElement(
7929
8015
  motion.div,
7930
8016
  {
7931
8017
  initial: { opacity: 0, y: 24 },
@@ -7933,7 +8019,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7933
8019
  transition: { delay: 0.15 },
7934
8020
  className: "mt-12 flex flex-col gap-6 rounded-3xl border border-white/20 bg-white/10 p-6 backdrop-blur md:flex-row md:items-center md:justify-between"
7935
8021
  },
7936
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, "Explore popular searches"), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2" }, quickSearches.map((term) => /* @__PURE__ */ React19.createElement(
8022
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, "Explore popular searches"), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2" }, quickSearches.map((term) => /* @__PURE__ */ React20.createElement(
7937
8023
  "button",
7938
8024
  {
7939
8025
  key: term,
@@ -7943,7 +8029,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7943
8029
  },
7944
8030
  term
7945
8031
  )))),
7946
- topCategories.length > 0 && /* @__PURE__ */ React19.createElement("div", { className: "space-y-3 md:text-right" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, "Trending categories"), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap justify-start gap-2 md:justify-end" }, topCategories.map((category) => /* @__PURE__ */ React19.createElement(
8032
+ topCategories.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "space-y-3 md:text-right" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, "Trending categories"), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap justify-start gap-2 md:justify-end" }, topCategories.map((category) => /* @__PURE__ */ React20.createElement(
7947
8033
  "button",
7948
8034
  {
7949
8035
  key: category.id,
@@ -7953,9 +8039,9 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7953
8039
  },
7954
8040
  category.name
7955
8041
  ))))
7956
- ), /* @__PURE__ */ React19.createElement("div", { className: "mt-10 grid gap-4 md:grid-cols-3" }, insightCards.map((card, index) => {
8042
+ ), /* @__PURE__ */ React20.createElement("div", { className: "mt-10 grid gap-4 md:grid-cols-3" }, insightCards.map((card, index) => {
7957
8043
  const Icon = card.icon;
7958
- return /* @__PURE__ */ React19.createElement(
8044
+ return /* @__PURE__ */ React20.createElement(
7959
8045
  motion.div,
7960
8046
  {
7961
8047
  key: card.id,
@@ -7968,10 +8054,10 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7968
8054
  "aria-pressed": card.id === "new" ? newArrivals ? "true" : "false" : void 0,
7969
8055
  title: card.id === "new" ? newArrivals ? "Filter active: showing products from the last 30 days" : "Click to filter products from the last 30 days" : void 0
7970
8056
  },
7971
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, card.label), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-3xl font-semibold text-white" }, card.value)), /* @__PURE__ */ React19.createElement("span", { className: "rounded-full bg-white/20 p-3 text-white" }, /* @__PURE__ */ React19.createElement(Icon, { className: "h-5 w-5" }))),
7972
- /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-sm text-white/70" }, card.helper)
8057
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-white/60" }, card.label), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-3xl font-semibold text-white" }, card.value)), /* @__PURE__ */ React20.createElement("span", { className: "rounded-full bg-white/20 p-3 text-white" }, /* @__PURE__ */ React20.createElement(Icon, { className: "h-5 w-5" }))),
8058
+ /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-sm text-white/70" }, card.helper)
7973
8059
  );
7974
- })))), /* @__PURE__ */ React19.createElement("div", { className: "relative z-10 -mt-12 pb-16" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-8 lg:flex-row" }, /* @__PURE__ */ React19.createElement("aside", { className: "hidden w-72 flex-shrink-0 lg:block" }, /* @__PURE__ */ React19.createElement("div", { className: "sticky top-24 rounded-3xl border border-gray-100 bg-white p-6 shadow-xl shadow-gray-200/40" }, renderFiltersPanel())), /* @__PURE__ */ React19.createElement("main", { className: "flex-1 space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-gray-100 bg-white p-6 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h2", { className: "text-2xl font-bold text-gray-900" }, "All products"), /* @__PURE__ */ React19.createElement("p", { className: "mt-1 text-sm text-gray-500" }, "Browse a pharmacy-grade catalogue with smart merchandising and modern UI.")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3 md:flex-row md:items-center" }, /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(ArrowUpDown, { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), /* @__PURE__ */ React19.createElement(
8060
+ })))), /* @__PURE__ */ React20.createElement("div", { className: "relative z-10 -mt-12 pb-16" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-8 lg:flex-row" }, /* @__PURE__ */ React20.createElement("aside", { className: "hidden w-72 flex-shrink-0 lg:block" }, /* @__PURE__ */ React20.createElement("div", { className: "sticky top-24 rounded-3xl border border-gray-100 bg-white p-6 shadow-xl shadow-gray-200/40" }, renderFiltersPanel())), /* @__PURE__ */ React20.createElement("main", { className: "flex-1 space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-gray-100 bg-white p-6 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h2", { className: "text-2xl font-bold text-gray-900" }, "All products"), /* @__PURE__ */ React20.createElement("p", { className: "mt-1 text-sm text-gray-500" }, "Browse a pharmacy-grade catalogue with smart merchandising and modern UI.")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3 md:flex-row md:items-center" }, /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(ArrowUpDown, { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), /* @__PURE__ */ React20.createElement(
7975
8061
  "select",
7976
8062
  {
7977
8063
  value: sortOption,
@@ -7980,11 +8066,11 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7980
8066
  },
7981
8067
  className: "appearance-none rounded-xl border border-gray-200 bg-white py-2.5 pl-10 pr-9 text-sm font-medium text-gray-700 shadow-sm transition focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/30"
7982
8068
  },
7983
- /* @__PURE__ */ React19.createElement("option", { value: "featured" }, "Featured products"),
7984
- /* @__PURE__ */ React19.createElement("option", { value: "price-low-high" }, "Price: low to high"),
7985
- /* @__PURE__ */ React19.createElement("option", { value: "price-high-low" }, "Price: high to low"),
7986
- /* @__PURE__ */ React19.createElement("option", { value: "newest" }, "Newest arrivals")
7987
- ), /* @__PURE__ */ React19.createElement(ChevronDown, { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" })), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center rounded-xl border border-gray-200 bg-white shadow-sm" }, /* @__PURE__ */ React19.createElement(
8069
+ /* @__PURE__ */ React20.createElement("option", { value: "featured" }, "Featured products"),
8070
+ /* @__PURE__ */ React20.createElement("option", { value: "price-low-high" }, "Price: low to high"),
8071
+ /* @__PURE__ */ React20.createElement("option", { value: "price-high-low" }, "Price: high to low"),
8072
+ /* @__PURE__ */ React20.createElement("option", { value: "newest" }, "Newest arrivals")
8073
+ ), /* @__PURE__ */ React20.createElement(ChevronDown, { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" })), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center rounded-xl border border-gray-200 bg-white shadow-sm" }, /* @__PURE__ */ React20.createElement(
7988
8074
  "button",
7989
8075
  {
7990
8076
  type: "button",
@@ -7992,9 +8078,9 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
7992
8078
  className: `flex items-center gap-2 rounded-l-xl px-4 py-2 text-sm font-medium transition ${viewMode === "grid" ? "bg-primary-50 text-primary-600" : "text-gray-500 hover:text-gray-700"}`,
7993
8079
  "aria-pressed": viewMode === "grid"
7994
8080
  },
7995
- /* @__PURE__ */ React19.createElement(LayoutGrid, { className: "h-4 w-4" }),
8081
+ /* @__PURE__ */ React20.createElement(LayoutGrid, { className: "h-4 w-4" }),
7996
8082
  "Grid"
7997
- ), /* @__PURE__ */ React19.createElement(
8083
+ ), /* @__PURE__ */ React20.createElement(
7998
8084
  "button",
7999
8085
  {
8000
8086
  type: "button",
@@ -8002,19 +8088,19 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8002
8088
  className: `flex items-center gap-2 rounded-r-xl px-4 py-2 text-sm font-medium transition ${viewMode === "list" ? "bg-primary-50 text-primary-600" : "text-gray-500 hover:text-gray-700"}`,
8003
8089
  "aria-pressed": viewMode === "list"
8004
8090
  },
8005
- /* @__PURE__ */ React19.createElement(LayoutList, { className: "h-4 w-4" }),
8091
+ /* @__PURE__ */ React20.createElement(LayoutList, { className: "h-4 w-4" }),
8006
8092
  "List"
8007
- )))), /* @__PURE__ */ React19.createElement("div", { className: "mt-4 md:hidden" }, /* @__PURE__ */ React19.createElement(
8093
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "mt-4 md:hidden" }, /* @__PURE__ */ React20.createElement(
8008
8094
  Button,
8009
8095
  {
8010
8096
  variant: "outline",
8011
8097
  className: "w-full",
8012
8098
  onClick: () => setShowFilters(true)
8013
8099
  },
8014
- /* @__PURE__ */ React19.createElement(SlidersHorizontal, { className: "h-5 w-5" }),
8100
+ /* @__PURE__ */ React20.createElement(SlidersHorizontal, { className: "h-5 w-5" }),
8015
8101
  "Filters",
8016
- hasActiveFilters && /* @__PURE__ */ React19.createElement("span", { className: "ml-2 rounded-full bg-primary-600 px-2 py-0.5 text-xs font-semibold text-white" }, activeFilterChips.length)
8017
- )), hasActiveFilters && /* @__PURE__ */ React19.createElement("div", { className: "mt-6 flex flex-wrap items-center gap-2 border-t border-gray-100 pt-4" }, activeFilterChips.map((chip) => /* @__PURE__ */ React19.createElement(
8102
+ hasActiveFilters && /* @__PURE__ */ React20.createElement("span", { className: "ml-2 rounded-full bg-primary-600 px-2 py-0.5 text-xs font-semibold text-white" }, activeFilterChips.length)
8103
+ )), hasActiveFilters && /* @__PURE__ */ React20.createElement("div", { className: "mt-6 flex flex-wrap items-center gap-2 border-t border-gray-100 pt-4" }, activeFilterChips.map((chip) => /* @__PURE__ */ React20.createElement(
8018
8104
  "button",
8019
8105
  {
8020
8106
  key: chip.key,
@@ -8023,8 +8109,8 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8023
8109
  className: "group flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1.5 text-sm font-medium text-primary-700 transition hover:bg-primary-100"
8024
8110
  },
8025
8111
  chip.label,
8026
- /* @__PURE__ */ React19.createElement(X, { className: "h-4 w-4 text-primary-500 group-hover:text-primary-700" })
8027
- )), /* @__PURE__ */ React19.createElement(
8112
+ /* @__PURE__ */ React20.createElement(X, { className: "h-4 w-4 text-primary-500 group-hover:text-primary-700" })
8113
+ )), /* @__PURE__ */ React20.createElement(
8028
8114
  "button",
8029
8115
  {
8030
8116
  type: "button",
@@ -8032,28 +8118,28 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8032
8118
  className: "text-sm font-semibold text-gray-500 hover:text-gray-700"
8033
8119
  },
8034
8120
  "Reset all"
8035
- ))), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-gray-100 bg-white p-6 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3 text-sm text-gray-600 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement("span", null, isLoading ? "Loading products..." : `Showing ${displayedProducts.length} of ${pagination.total || displayedProducts.length} products`), /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 text-gray-400" }, /* @__PURE__ */ React19.createElement(Clock, { className: "h-4 w-4" }), "Updated a moment ago")), /* @__PURE__ */ React19.createElement("div", { className: "mt-6" }, isLoading ? /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3" }, Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ React19.createElement(ProductCardSkeleton, { key: index }))) : displayedProducts.length > 0 ? viewMode === "grid" ? /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3" }, displayedProducts.map((product) => /* @__PURE__ */ React19.createElement("div", { key: product.id, className: "h-full" }, /* @__PURE__ */ React19.createElement(
8121
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-gray-100 bg-white p-6 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3 text-sm text-gray-600 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement("span", null, isLoading ? "Loading products..." : `Showing ${displayedProducts.length} of ${pagination.total || displayedProducts.length} products`), /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 text-gray-400" }, /* @__PURE__ */ React20.createElement(Clock, { className: "h-4 w-4" }), "Updated a moment ago")), /* @__PURE__ */ React20.createElement("div", { className: "mt-6" }, isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3" }, Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ React20.createElement(ProductCardSkeleton, { key: index }))) : displayedProducts.length > 0 ? viewMode === "grid" ? /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3" }, displayedProducts.map((product) => /* @__PURE__ */ React20.createElement("div", { key: product.id, className: "h-full" }, /* @__PURE__ */ React20.createElement(
8036
8122
  ProductCard,
8037
8123
  {
8038
8124
  product,
8039
8125
  onClickProduct: (item) => {
8040
8126
  const productData = encodeURIComponent(JSON.stringify(item));
8041
- router.push(`/products/${item.id}?product=${productData}`);
8127
+ router.push(buildPath(`/products/${item.id}?product=${productData}`));
8042
8128
  }
8043
8129
  }
8044
- )))) : /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, displayedProducts.map((product) => {
8130
+ )))) : /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, displayedProducts.map((product) => {
8045
8131
  product.priceBeforeDiscount && product.priceBeforeDiscount > product.finalPrice ? Math.round(
8046
8132
  (product.priceBeforeDiscount - product.finalPrice) / product.priceBeforeDiscount * 100
8047
8133
  ) : 0;
8048
- return /* @__PURE__ */ React19.createElement(
8134
+ return /* @__PURE__ */ React20.createElement(
8049
8135
  motion.div,
8050
8136
  {
8051
8137
  key: product.id,
8052
8138
  whileHover: { y: -4 },
8053
8139
  className: "group flex cursor-pointer flex-col gap-6 rounded-2xl border border-gray-100 bg-white p-5 shadow-sm transition hover:shadow-xl md:flex-row md:items-start",
8054
- onClick: () => router.push(`/products/${product.id}`)
8140
+ onClick: () => router.push(buildPath(`/products/${product.id}`))
8055
8141
  },
8056
- /* @__PURE__ */ React19.createElement("div", { className: "relative h-48 w-full overflow-hidden rounded-2xl bg-gray-100 md:h-40 md:w-40" }, /* @__PURE__ */ React19.createElement(
8142
+ /* @__PURE__ */ React20.createElement("div", { className: "relative h-48 w-full overflow-hidden rounded-2xl bg-gray-100 md:h-40 md:w-40" }, /* @__PURE__ */ React20.createElement(
8057
8143
  Image3,
8058
8144
  {
8059
8145
  src: product.productMedia[0]?.file || "/placeholder-product.jpg",
@@ -8062,27 +8148,27 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8062
8148
  className: "object-cover transition duration-500 group-hover:scale-105"
8063
8149
  }
8064
8150
  )),
8065
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1 space-y-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-2 text-xs font-semibold uppercase tracking-wide text-primary-600" }, product.parentCategories.length > 0 && /* @__PURE__ */ React19.createElement("span", { className: "rounded-full bg-primary-50 px-3 py-1 text-primary-700" }, product.parentCategories.map((category) => category?.name).join(", ")), product.tags?.slice(0, 3).map((tag) => /* @__PURE__ */ React19.createElement(
8151
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1 space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-2 text-xs font-semibold uppercase tracking-wide text-primary-600" }, product.parentCategories.length > 0 && /* @__PURE__ */ React20.createElement("span", { className: "rounded-full bg-primary-50 px-3 py-1 text-primary-700" }, product.parentCategories.map((category) => category?.name).join(", ")), product.tags?.slice(0, 3).map((tag) => /* @__PURE__ */ React20.createElement(
8066
8152
  "span",
8067
8153
  {
8068
8154
  key: tag,
8069
8155
  className: "rounded-full bg-slate-100 px-3 py-1 text-gray-600"
8070
8156
  },
8071
8157
  tag
8072
- ))), /* @__PURE__ */ React19.createElement("h3", { className: "text-xl font-semibold text-gray-900" }, product.name), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-4 text-sm text-gray-500" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 font-medium text-primary-600" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-4 w-4" }), product.inventoryCount > 0 ? "In stock & ready to ship" : "Restocking soon"), /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2" }, /* @__PURE__ */ React19.createElement(Clock, { className: "h-4 w-4 text-primary-500" }), "Added ", new Date(product.createdAt).toLocaleDateString()))),
8073
- /* @__PURE__ */ React19.createElement("div", { className: "flex w-full flex-col items-end gap-3 md:w-auto" }, /* @__PURE__ */ React19.createElement("div", { className: "text-right" }, /* @__PURE__ */ React19.createElement("p", { className: "text-3xl font-semibold text-gray-900" }, formatPrice(product.finalPrice)), product.priceBeforeDiscount && /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-gray-400 line-through" }, formatPrice(product.priceBeforeDiscount))), /* @__PURE__ */ React19.createElement(
8158
+ ))), /* @__PURE__ */ React20.createElement("h3", { className: "text-xl font-semibold text-gray-900" }, product.name), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-4 text-sm text-gray-500" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 font-medium text-primary-600" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-4 w-4" }), product.inventoryCount > 0 ? "In stock & ready to ship" : "Restocking soon"), /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2" }, /* @__PURE__ */ React20.createElement(Clock, { className: "h-4 w-4 text-primary-500" }), "Added ", new Date(product.createdAt).toLocaleDateString()))),
8159
+ /* @__PURE__ */ React20.createElement("div", { className: "flex w-full flex-col items-end gap-3 md:w-auto" }, /* @__PURE__ */ React20.createElement("div", { className: "text-right" }, /* @__PURE__ */ React20.createElement("p", { className: "text-3xl font-semibold text-gray-900" }, formatPrice(product.finalPrice)), product.priceBeforeDiscount && /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-gray-400 line-through" }, formatPrice(product.priceBeforeDiscount))), /* @__PURE__ */ React20.createElement(
8074
8160
  Button,
8075
8161
  {
8076
8162
  size: "sm",
8077
8163
  onClick: (event) => {
8078
8164
  event.stopPropagation();
8079
- router.push(`/products/${product._id}`);
8165
+ router.push(buildPath(`/products/${product._id}`));
8080
8166
  }
8081
8167
  },
8082
8168
  "View product"
8083
8169
  ))
8084
8170
  );
8085
- })) : /* @__PURE__ */ React19.createElement(
8171
+ })) : /* @__PURE__ */ React20.createElement(
8086
8172
  EmptyState,
8087
8173
  {
8088
8174
  icon: Package,
@@ -8091,7 +8177,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8091
8177
  actionLabel: hasActiveFilters ? "Clear filters" : void 0,
8092
8178
  onAction: hasActiveFilters ? handleClearFilters : void 0
8093
8179
  }
8094
- )), pagination.totalPages > 1 && /* @__PURE__ */ React19.createElement("div", { className: "mt-10 flex flex-wrap items-center justify-center gap-3" }, /* @__PURE__ */ React19.createElement(
8180
+ )), pagination.totalPages > 1 && /* @__PURE__ */ React20.createElement("div", { className: "mt-10 flex flex-wrap items-center justify-center gap-3" }, /* @__PURE__ */ React20.createElement(
8095
8181
  Button,
8096
8182
  {
8097
8183
  variant: "outline",
@@ -8099,7 +8185,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8099
8185
  disabled: page === 1
8100
8186
  },
8101
8187
  "Previous"
8102
- ), /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-semibold text-gray-600" }, "Page ", page, " of ", pagination.totalPages), /* @__PURE__ */ React19.createElement(
8188
+ ), /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-semibold text-gray-600" }, "Page ", page, " of ", pagination.totalPages), /* @__PURE__ */ React20.createElement(
8103
8189
  Button,
8104
8190
  {
8105
8191
  variant: "outline",
@@ -8107,7 +8193,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8107
8193
  disabled: page === pagination.totalPages
8108
8194
  },
8109
8195
  "Next"
8110
- ))))))), /* @__PURE__ */ React19.createElement(AnimatePresence, null, showFilters && /* @__PURE__ */ React19.createElement(
8196
+ ))))))), /* @__PURE__ */ React20.createElement(AnimatePresence, null, showFilters && /* @__PURE__ */ React20.createElement(
8111
8197
  motion.div,
8112
8198
  {
8113
8199
  initial: { opacity: 0 },
@@ -8115,7 +8201,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8115
8201
  exit: { opacity: 0 },
8116
8202
  className: "fixed inset-0 z-50 bg-black/40 backdrop-blur-sm lg:hidden"
8117
8203
  },
8118
- /* @__PURE__ */ React19.createElement(
8204
+ /* @__PURE__ */ React20.createElement(
8119
8205
  motion.div,
8120
8206
  {
8121
8207
  initial: { y: "100%" },
@@ -8124,14 +8210,14 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8124
8210
  transition: { type: "spring", stiffness: 260, damping: 26 },
8125
8211
  className: "absolute inset-x-0 bottom-0 max-h-[85vh] overflow-y-auto rounded-t-3xl bg-white p-6 shadow-2xl"
8126
8212
  },
8127
- /* @__PURE__ */ React19.createElement("div", { className: "mb-6 flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, "Filters"), /* @__PURE__ */ React19.createElement(
8213
+ /* @__PURE__ */ React20.createElement("div", { className: "mb-6 flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, "Filters"), /* @__PURE__ */ React20.createElement(
8128
8214
  "button",
8129
8215
  {
8130
8216
  type: "button",
8131
8217
  onClick: () => setShowFilters(false),
8132
8218
  className: "rounded-full border border-gray-200 p-2 text-gray-500 hover:text-gray-700"
8133
8219
  },
8134
- /* @__PURE__ */ React19.createElement(X, { className: "h-4 w-4" })
8220
+ /* @__PURE__ */ React20.createElement(X, { className: "h-4 w-4" })
8135
8221
  )),
8136
8222
  renderFiltersPanel()
8137
8223
  )
@@ -8150,7 +8236,7 @@ function Badge({ children, variant = "primary", size = "md", className = "" }) {
8150
8236
  sm: "px-2 py-1 text-xs",
8151
8237
  md: "px-3 py-1 text-sm"
8152
8238
  };
8153
- return /* @__PURE__ */ React19.createElement("span", { className: `inline-flex items-center font-medium rounded-full border ${variants[variant]} ${sizes[size]} ${className}` }, children);
8239
+ return /* @__PURE__ */ React20.createElement("span", { className: `inline-flex items-center font-medium rounded-full border ${variants[variant]} ${sizes[size]} ${className}` }, children);
8154
8240
  }
8155
8241
  var safeFormatDate = (date, format = "long") => {
8156
8242
  if (!date) return "N/A";
@@ -8164,6 +8250,7 @@ var safeFormatDate = (date, format = "long") => {
8164
8250
  };
8165
8251
  function ProductDetailScreen({ productId }) {
8166
8252
  const router = useRouter();
8253
+ const { buildPath } = useBasePath();
8167
8254
  const { product: productData, isLoading } = useProduct(productId);
8168
8255
  const { addToCart } = useCart();
8169
8256
  const [selectedVariant, setSelectedVariant] = useState(null);
@@ -8309,10 +8396,10 @@ function ProductDetailScreen({ productId }) {
8309
8396
  }
8310
8397
  };
8311
8398
  if (isLoading) {
8312
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "h-[520px] animate-pulse rounded-3xl bg-slate-200" }), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-3 gap-4" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React19.createElement("div", { key: index, className: "h-32 animate-pulse rounded-2xl bg-slate-200" })))), /* @__PURE__ */ React19.createElement("div", { className: "space-y-4 rounded-3xl bg-white p-6 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "h-8 w-32 animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React19.createElement("div", { className: "h-10 w-48 animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React19.createElement("div", { className: "h-6 w-full animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React19.createElement("div", { className: "h-12 w-full animate-pulse rounded-2xl bg-slate-200" }), /* @__PURE__ */ React19.createElement("div", { className: "h-12 w-full animate-pulse rounded-2xl bg-slate-200" })))));
8399
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "h-[520px] animate-pulse rounded-3xl bg-slate-200" }), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-3 gap-4" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React20.createElement("div", { key: index, className: "h-32 animate-pulse rounded-2xl bg-slate-200" })))), /* @__PURE__ */ React20.createElement("div", { className: "space-y-4 rounded-3xl bg-white p-6 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "h-8 w-32 animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React20.createElement("div", { className: "h-10 w-48 animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React20.createElement("div", { className: "h-6 w-full animate-pulse rounded-full bg-slate-200" }), /* @__PURE__ */ React20.createElement("div", { className: "h-12 w-full animate-pulse rounded-2xl bg-slate-200" }), /* @__PURE__ */ React20.createElement("div", { className: "h-12 w-full animate-pulse rounded-2xl bg-slate-200" })))));
8313
8400
  }
8314
8401
  if (!product) {
8315
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl bg-white p-10 text-center shadow-sm" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "mx-auto h-10 w-10 text-primary-500" }), /* @__PURE__ */ React19.createElement("h1", { className: "mt-6 text-2xl font-semibold text-gray-900" }, "Product not found"), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-gray-600" }, "It may have been removed or is temporarily unavailable. Discover other pharmacy essentials in our catalogue."), /* @__PURE__ */ React19.createElement("div", { className: "mt-6" }, /* @__PURE__ */ React19.createElement(Link8, { href: "/shop", className: "inline-block" }, /* @__PURE__ */ React19.createElement(Button, null, "Browse products"))))));
8402
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl bg-white p-10 text-center shadow-sm" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "mx-auto h-10 w-10 text-primary-500" }), /* @__PURE__ */ React20.createElement("h1", { className: "mt-6 text-2xl font-semibold text-gray-900" }, "Product not found"), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-gray-600" }, "It may have been removed or is temporarily unavailable. Discover other pharmacy essentials in our catalogue."), /* @__PURE__ */ React20.createElement("div", { className: "mt-6" }, /* @__PURE__ */ React20.createElement(Link8, { href: "/shop", className: "inline-block" }, /* @__PURE__ */ React20.createElement(Button, null, "Browse products"))))));
8316
8403
  }
8317
8404
  product.tags && product.tags.length > 0 ? product.tags.slice(0, 6) : ["Pharmacist approved", "Gentle on daily routines", "Backed by real customers"];
8318
8405
  const highlightCards = [
@@ -8332,29 +8419,29 @@ function ProductDetailScreen({ productId }) {
8332
8419
  description: "Average rating 4.8/5 with over 120 verified customer experiences."
8333
8420
  }
8334
8421
  ];
8335
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React19.createElement(
8422
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React20.createElement(
8336
8423
  "div",
8337
8424
  {
8338
8425
  className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]",
8339
8426
  "aria-hidden": "true"
8340
8427
  }
8341
- ), /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,_rgba(255,255,255,0.25),_transparent_55%)] opacity-70" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement(
8428
+ ), /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,_rgba(255,255,255,0.25),_transparent_55%)] opacity-70" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement(
8342
8429
  Button,
8343
8430
  {
8344
8431
  variant: "ghost",
8345
8432
  className: "text-white hover:bg-white/10",
8346
- onClick: () => router.push("/shop")
8433
+ onClick: () => router.push(buildPath("/shop"))
8347
8434
  },
8348
- /* @__PURE__ */ React19.createElement(ArrowLeft, { className: "h-5 w-5" }),
8435
+ /* @__PURE__ */ React20.createElement(ArrowLeft, { className: "h-5 w-5" }),
8349
8436
  "Continue shopping"
8350
- ), /* @__PURE__ */ React19.createElement("div", { className: "hidden items-center gap-3 text-sm text-white/80 md:flex" }, /* @__PURE__ */ React19.createElement(Link8, { href: "/", className: "transition hover:text-white" }, "Home"), /* @__PURE__ */ React19.createElement(ChevronRight, { className: "h-4 w-4" }), /* @__PURE__ */ React19.createElement(Link8, { href: "/shop", className: "transition hover:text-white" }, "Shop"), /* @__PURE__ */ React19.createElement(ChevronRight, { className: "h-4 w-4" }), /* @__PURE__ */ React19.createElement("span", { className: "truncate font-medium text-white" }, product.name))), /* @__PURE__ */ React19.createElement(
8437
+ ), /* @__PURE__ */ React20.createElement("div", { className: "hidden items-center gap-3 text-sm text-white/80 md:flex" }, /* @__PURE__ */ React20.createElement(Link8, { href: buildPath("/"), className: "transition hover:text-white" }, "Home"), /* @__PURE__ */ React20.createElement(ChevronRight, { className: "h-4 w-4" }), /* @__PURE__ */ React20.createElement(Link8, { href: buildPath("/shop"), className: "transition hover:text-white" }, "Shop"), /* @__PURE__ */ React20.createElement(ChevronRight, { className: "h-4 w-4" }), /* @__PURE__ */ React20.createElement("span", { className: "truncate font-medium text-white" }, product.name))), /* @__PURE__ */ React20.createElement(
8351
8438
  motion.div,
8352
8439
  {
8353
8440
  initial: { opacity: 0, y: 24 },
8354
8441
  animate: { opacity: 1, y: 0 },
8355
8442
  className: "max-w-3xl space-y-4"
8356
8443
  },
8357
- product.category && /* @__PURE__ */ React19.createElement(
8444
+ product.category && /* @__PURE__ */ React20.createElement(
8358
8445
  Badge,
8359
8446
  {
8360
8447
  variant: "secondary",
@@ -8362,9 +8449,9 @@ function ProductDetailScreen({ productId }) {
8362
8449
  },
8363
8450
  product.category
8364
8451
  ),
8365
- /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-5xl" }, product.name),
8366
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-3 text-sm text-white/80" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 font-medium text-white" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4" }), "Ready to ship today"), /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 font-medium text-white" }, /* @__PURE__ */ React19.createElement(Shield, { className: "h-4 w-4" }), "30-day happiness guarantee"))
8367
- )))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-10" }, /* @__PURE__ */ React19.createElement("section", { className: "rounded-3xl border border-white bg-white/70 p-6 shadow-xl shadow-primary-100/40 backdrop-blur" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-6 lg:grid-cols-[minmax(0,1fr)_220px]" }, /* @__PURE__ */ React19.createElement(
8452
+ /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-5xl" }, product.name),
8453
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-3 text-sm text-white/80" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 font-medium text-white" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4" }), "Ready to ship today"), /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 font-medium text-white" }, /* @__PURE__ */ React20.createElement(Shield, { className: "h-4 w-4" }), "30-day happiness guarantee"))
8454
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-10" }, /* @__PURE__ */ React20.createElement("section", { className: "rounded-3xl border border-white bg-white/70 p-6 shadow-xl shadow-primary-100/40 backdrop-blur" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-6 lg:grid-cols-[minmax(0,1fr)_220px]" }, /* @__PURE__ */ React20.createElement(
8368
8455
  motion.div,
8369
8456
  {
8370
8457
  key: variantImages[activeImageIndex],
@@ -8373,7 +8460,7 @@ function ProductDetailScreen({ productId }) {
8373
8460
  transition: { duration: 0.35 },
8374
8461
  className: "relative overflow-hidden rounded-3xl bg-slate-100 h-[420px] md:h-[560px]"
8375
8462
  },
8376
- /* @__PURE__ */ React19.createElement(
8463
+ /* @__PURE__ */ React20.createElement(
8377
8464
  Image3,
8378
8465
  {
8379
8466
  src: variantImages[activeImageIndex],
@@ -8384,7 +8471,7 @@ function ProductDetailScreen({ productId }) {
8384
8471
  className: "object-contain"
8385
8472
  }
8386
8473
  ),
8387
- discount > 0 && /* @__PURE__ */ React19.createElement(
8474
+ discount > 0 && /* @__PURE__ */ React20.createElement(
8388
8475
  Badge,
8389
8476
  {
8390
8477
  variant: "danger",
@@ -8394,7 +8481,7 @@ function ProductDetailScreen({ productId }) {
8394
8481
  discount,
8395
8482
  "%"
8396
8483
  ),
8397
- !variantInStock && /* @__PURE__ */ React19.createElement(
8484
+ !variantInStock && /* @__PURE__ */ React20.createElement(
8398
8485
  Badge,
8399
8486
  {
8400
8487
  variant: "secondary",
@@ -8402,7 +8489,7 @@ function ProductDetailScreen({ productId }) {
8402
8489
  },
8403
8490
  "Out of Stock"
8404
8491
  )
8405
- ), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4" }, product?.productVariants?.length > 0 && /* @__PURE__ */ React19.createElement("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm" }, /* @__PURE__ */ React19.createElement("p", { className: "mb-2 text-sm font-semibold uppercase tracking-[0.25em] text-slate-400" }, "Variant"), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2" }, product?.productVariants?.map((variant, index) => /* @__PURE__ */ React19.createElement(
8492
+ ), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4" }, product?.productVariants?.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "rounded-2xl border border-slate-200 bg-white p-4 shadow-sm" }, /* @__PURE__ */ React20.createElement("p", { className: "mb-2 text-sm font-semibold uppercase tracking-[0.25em] text-slate-400" }, "Variant"), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2" }, product?.productVariants?.map((variant, index) => /* @__PURE__ */ React20.createElement(
8406
8493
  "button",
8407
8494
  {
8408
8495
  key: variant.id,
@@ -8411,7 +8498,7 @@ function ProductDetailScreen({ productId }) {
8411
8498
  className: `rounded-full px-4 py-2 text-sm font-medium transition ${selectedVariant?.id === variant.id ? "bg-primary-600 text-white" : "bg-slate-100 text-slate-700 hover:bg-slate-200"}`
8412
8499
  },
8413
8500
  variant.name
8414
- )))), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-3 gap-3" }, variantImages.map((image, index) => /* @__PURE__ */ React19.createElement(
8501
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-3 gap-3" }, variantImages.map((image, index) => /* @__PURE__ */ React20.createElement(
8415
8502
  "button",
8416
8503
  {
8417
8504
  key: image.src + index,
@@ -8419,7 +8506,7 @@ function ProductDetailScreen({ productId }) {
8419
8506
  onClick: () => setActiveImageIndex(index),
8420
8507
  className: `relative aspect-square overflow-hidden rounded-2xl border transition ${activeImageIndex === index ? "border-primary-500 shadow-lg shadow-primary-200/60" : "border-transparent hover:border-primary-200"}`
8421
8508
  },
8422
- /* @__PURE__ */ React19.createElement(
8509
+ /* @__PURE__ */ React20.createElement(
8423
8510
  Image3,
8424
8511
  {
8425
8512
  src: image.src,
@@ -8430,18 +8517,18 @@ function ProductDetailScreen({ productId }) {
8430
8517
  unoptimized: true
8431
8518
  }
8432
8519
  )
8433
- )))))), /* @__PURE__ */ React19.createElement("section", { className: "grid gap-6 lg:grid-cols-3" }, highlightCards.map((card) => {
8520
+ )))))), /* @__PURE__ */ React20.createElement("section", { className: "grid gap-6 lg:grid-cols-3" }, highlightCards.map((card) => {
8434
8521
  const Icon = card.icon;
8435
- return /* @__PURE__ */ React19.createElement(
8522
+ return /* @__PURE__ */ React20.createElement(
8436
8523
  "div",
8437
8524
  {
8438
8525
  key: card.title,
8439
8526
  className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-sm transition hover:-translate-y-1 hover:shadow-lg"
8440
8527
  },
8441
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement("span", { className: "rounded-2xl bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React19.createElement(Icon, { className: "h-5 w-5" })), /* @__PURE__ */ React19.createElement("h3", { className: "text-base font-semibold text-slate-900" }, card.title)),
8442
- /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-sm leading-relaxed text-slate-600" }, card.description)
8528
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement("span", { className: "rounded-2xl bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React20.createElement(Icon, { className: "h-5 w-5" })), /* @__PURE__ */ React20.createElement("h3", { className: "text-base font-semibold text-slate-900" }, card.title)),
8529
+ /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-sm leading-relaxed text-slate-600" }, card.description)
8443
8530
  );
8444
- })), /* @__PURE__ */ React19.createElement("section", { className: "grid gap-6 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-4 pb-6" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-1 text-amber-500" }, Array.from({ length: 5 }).map((_, index) => /* @__PURE__ */ React19.createElement(Star, { key: index, className: "h-4 w-4 fill-current" }))), /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-medium text-slate-500" }, "Rated 4.8 \u2022 Patients love the results")), /* @__PURE__ */ React19.createElement("div", { className: "space-y-8" }, product.description && /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, "Description"), /* @__PURE__ */ React19.createElement("p", { className: "text-base leading-relaxed text-slate-600", dangerouslySetInnerHTML: { __html: product.description } })))), /* @__PURE__ */ React19.createElement("div", { className: "h-full rounded-3xl border border-slate-100 bg-gradient-to-br from-primary-50 via-white to-secondary-50 p-8 shadow-sm" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-primary-500" }, "Care tips"), /* @__PURE__ */ React19.createElement("div", { className: "mt-4 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("p", { className: "leading-relaxed" }, "Store in a cool, dry place away from direct sunlight. Check packaging for allergen statements."), /* @__PURE__ */ React19.createElement("p", { className: "leading-relaxed" }, "Consult with your local pharmacist if you are combining with other treatments or have chronic conditions."), /* @__PURE__ */ React19.createElement("p", { className: "rounded-2xl bg-white/60 p-4 leading-relaxed text-primary-700" }, "Questions? Our care team is on standby \u2014 reach us via chat for tailored support before you checkout.")))), /* @__PURE__ */ React19.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-sm" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Product insights"), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 grid gap-6 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-2xl border border-slate-200 bg-slate-50/60 p-5" }, /* @__PURE__ */ React19.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-slate-500" }, "Availability"), /* @__PURE__ */ React19.createElement("div", { className: "mt-3 flex items-center gap-2 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement(Check, { className: "h-4 w-4 text-primary-500" }), product.inStock ? "Available for dispatch today" : "Currently restocking"), product.stock !== void 0 && /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-xs text-slate-500" }, product.stock > 0 ? `${product.stock} units remaining in inventory` : "Join the waitlist to be notified first")), /* @__PURE__ */ React19.createElement("div", { className: "rounded-2xl border border-slate-200 bg-slate-50/60 p-5" }, /* @__PURE__ */ React19.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-slate-500" }, "Product details"), /* @__PURE__ */ React19.createElement("div", { className: "mt-3 space-y-2 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("span", { className: "font-medium text-slate-700" }, "Variant:"), " ", currentVariant.name), /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("span", { className: "font-medium text-slate-700" }, "SKU:"), " ", variantSku), /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("span", { className: "font-medium text-slate-700" }, "Status:"), " ", /* @__PURE__ */ React19.createElement("span", { className: variantInStock ? "text-green-600" : "text-amber-600" }, variantInStock ? "In Stock" : "Out of Stock")), /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("span", { className: "font-medium text-slate-700" }, "Last updated:"), " ", lastUpdatedLabel), /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("span", { className: "font-medium text-slate-700" }, "Ships from:"), " Local pharmacy distribution center")))))), /* @__PURE__ */ React19.createElement("aside", { className: "space-y-6 lg:sticky lg:top-24" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-100/40" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-baseline gap-3" }, /* @__PURE__ */ React19.createElement("p", { className: "text-3xl font-bold text-slate-900" }, selectedVariant ? formatPrice(selectedVariant.finalPrice) : formatPrice(product.price)), variantComparePrice && variantComparePrice > variantPrice && /* @__PURE__ */ React19.createElement("p", { className: "text-base text-slate-400 line-through" }, formatPrice(variantComparePrice)), discount > 0 && /* @__PURE__ */ React19.createElement(Badge, { variant: "danger", size: "sm" }, "-", discount, "%")), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 space-y-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3 rounded-2xl bg-primary-50/80 px-4 py-3 text-sm font-medium text-primary-700" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-4 w-4" }), "Pharmacist verified product"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between rounded-2xl border border-slate-200 px-4 py-3" }, /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-medium text-slate-600" }, "Qty"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center rounded-full border border-slate-200 bg-slate-50" }, /* @__PURE__ */ React19.createElement(
8531
+ })), /* @__PURE__ */ React20.createElement("section", { className: "grid gap-6 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-4 pb-6" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-1 text-amber-500" }, Array.from({ length: 5 }).map((_, index) => /* @__PURE__ */ React20.createElement(Star, { key: index, className: "h-4 w-4 fill-current" }))), /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-medium text-slate-500" }, "Rated 4.8 \u2022 Patients love the results")), /* @__PURE__ */ React20.createElement("div", { className: "space-y-8" }, product.description && /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, "Description"), /* @__PURE__ */ React20.createElement("p", { className: "text-base leading-relaxed text-slate-600", dangerouslySetInnerHTML: { __html: product.description } })))), /* @__PURE__ */ React20.createElement("div", { className: "h-full rounded-3xl border border-slate-100 bg-gradient-to-br from-primary-50 via-white to-secondary-50 p-8 shadow-sm" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-primary-500" }, "Care tips"), /* @__PURE__ */ React20.createElement("div", { className: "mt-4 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("p", { className: "leading-relaxed" }, "Store in a cool, dry place away from direct sunlight. Check packaging for allergen statements."), /* @__PURE__ */ React20.createElement("p", { className: "leading-relaxed" }, "Consult with your local pharmacist if you are combining with other treatments or have chronic conditions."), /* @__PURE__ */ React20.createElement("p", { className: "rounded-2xl bg-white/60 p-4 leading-relaxed text-primary-700" }, "Questions? Our care team is on standby \u2014 reach us via chat for tailored support before you checkout.")))), /* @__PURE__ */ React20.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-sm" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Product insights"), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 grid gap-6 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-2xl border border-slate-200 bg-slate-50/60 p-5" }, /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-slate-500" }, "Availability"), /* @__PURE__ */ React20.createElement("div", { className: "mt-3 flex items-center gap-2 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement(Check, { className: "h-4 w-4 text-primary-500" }), product.inStock ? "Available for dispatch today" : "Currently restocking"), product.stock !== void 0 && /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-xs text-slate-500" }, product.stock > 0 ? `${product.stock} units remaining in inventory` : "Join the waitlist to be notified first")), /* @__PURE__ */ React20.createElement("div", { className: "rounded-2xl border border-slate-200 bg-slate-50/60 p-5" }, /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-slate-500" }, "Product details"), /* @__PURE__ */ React20.createElement("div", { className: "mt-3 space-y-2 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("p", null, /* @__PURE__ */ React20.createElement("span", { className: "font-medium text-slate-700" }, "Variant:"), " ", currentVariant.name), /* @__PURE__ */ React20.createElement("p", null, /* @__PURE__ */ React20.createElement("span", { className: "font-medium text-slate-700" }, "SKU:"), " ", variantSku), /* @__PURE__ */ React20.createElement("p", null, /* @__PURE__ */ React20.createElement("span", { className: "font-medium text-slate-700" }, "Status:"), " ", /* @__PURE__ */ React20.createElement("span", { className: variantInStock ? "text-green-600" : "text-amber-600" }, variantInStock ? "In Stock" : "Out of Stock")), /* @__PURE__ */ React20.createElement("p", null, /* @__PURE__ */ React20.createElement("span", { className: "font-medium text-slate-700" }, "Last updated:"), " ", lastUpdatedLabel), /* @__PURE__ */ React20.createElement("p", null, /* @__PURE__ */ React20.createElement("span", { className: "font-medium text-slate-700" }, "Ships from:"), " Local pharmacy distribution center")))))), /* @__PURE__ */ React20.createElement("aside", { className: "space-y-6 lg:sticky lg:top-24" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-100/40" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-baseline gap-3" }, /* @__PURE__ */ React20.createElement("p", { className: "text-3xl font-bold text-slate-900" }, selectedVariant ? formatPrice(selectedVariant.finalPrice) : formatPrice(product.price)), variantComparePrice && variantComparePrice > variantPrice && /* @__PURE__ */ React20.createElement("p", { className: "text-base text-slate-400 line-through" }, formatPrice(variantComparePrice)), discount > 0 && /* @__PURE__ */ React20.createElement(Badge, { variant: "danger", size: "sm" }, "-", discount, "%")), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 space-y-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3 rounded-2xl bg-primary-50/80 px-4 py-3 text-sm font-medium text-primary-700" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-4 w-4" }), "Pharmacist verified product"), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between rounded-2xl border border-slate-200 px-4 py-3" }, /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-medium text-slate-600" }, "Qty"), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center rounded-full border border-slate-200 bg-slate-50" }, /* @__PURE__ */ React20.createElement(
8445
8532
  "button",
8446
8533
  {
8447
8534
  type: "button",
@@ -8449,8 +8536,8 @@ function ProductDetailScreen({ productId }) {
8449
8536
  className: "rounded-l-full p-2 hover:bg-primary-100/60",
8450
8537
  "aria-label": "Decrease quantity"
8451
8538
  },
8452
- /* @__PURE__ */ React19.createElement(Minus, { className: "h-4 w-4" })
8453
- ), /* @__PURE__ */ React19.createElement("span", { className: "w-12 text-center text-sm font-semibold text-slate-700" }, quantity), /* @__PURE__ */ React19.createElement(
8539
+ /* @__PURE__ */ React20.createElement(Minus, { className: "h-4 w-4" })
8540
+ ), /* @__PURE__ */ React20.createElement("span", { className: "w-12 text-center text-sm font-semibold text-slate-700" }, quantity), /* @__PURE__ */ React20.createElement(
8454
8541
  "button",
8455
8542
  {
8456
8543
  type: "button",
@@ -8458,8 +8545,8 @@ function ProductDetailScreen({ productId }) {
8458
8545
  className: "rounded-r-full p-2 hover:bg-primary-100/60",
8459
8546
  "aria-label": "Increase quantity"
8460
8547
  },
8461
- /* @__PURE__ */ React19.createElement(Plus, { className: "h-4 w-4" })
8462
- )))), selectedVariant && /* @__PURE__ */ React19.createElement("div", { className: "mt-4 text-sm" }, selectedVariant.inventoryStatus === "OUT_OF_STOCK" /* OUTOFSTOCK */ || selectedVariant.inventoryStatus === "LOW_STOCK" /* LOWSTOCK */ ? /* @__PURE__ */ React19.createElement("div", { className: "text-red-600 font-medium" }, "Out of Stock") : /* @__PURE__ */ React19.createElement("div", { className: "text-green-600 font-medium" }, "In Stock")), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 space-x-3" }, /* @__PURE__ */ React19.createElement(
8548
+ /* @__PURE__ */ React20.createElement(Plus, { className: "h-4 w-4" })
8549
+ )))), selectedVariant && /* @__PURE__ */ React20.createElement("div", { className: "mt-4 text-sm" }, selectedVariant.inventoryStatus === "OUT_OF_STOCK" /* OUTOFSTOCK */ || selectedVariant.inventoryStatus === "LOW_STOCK" /* LOWSTOCK */ ? /* @__PURE__ */ React20.createElement("div", { className: "text-red-600 font-medium" }, "Out of Stock") : /* @__PURE__ */ React20.createElement("div", { className: "text-green-600 font-medium" }, "In Stock")), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 space-x-3" }, /* @__PURE__ */ React20.createElement(
8463
8550
  Button,
8464
8551
  {
8465
8552
  size: "lg",
@@ -8468,9 +8555,9 @@ function ProductDetailScreen({ productId }) {
8468
8555
  isLoading: isAddingToCart,
8469
8556
  disabled: !selectedVariant || selectedVariant.inventoryStatus === "OUT_OF_STOCK" /* OUTOFSTOCK */
8470
8557
  },
8471
- /* @__PURE__ */ React19.createElement(ShoppingCart, { className: "h-5 w-5" }),
8558
+ /* @__PURE__ */ React20.createElement(ShoppingCart, { className: "h-5 w-5" }),
8472
8559
  !selectedVariant ? "Select a variant" : selectedVariant.inventoryStatus === "OUT_OF_STOCK" /* OUTOFSTOCK */ ? "Out of Stock" : `Add to Cart`
8473
- ), /* @__PURE__ */ React19.createElement(
8560
+ ), /* @__PURE__ */ React20.createElement(
8474
8561
  Button,
8475
8562
  {
8476
8563
  size: "lg",
@@ -8478,14 +8565,14 @@ function ProductDetailScreen({ productId }) {
8478
8565
  className: "w-full",
8479
8566
  onClick: handleToggleFavorite
8480
8567
  },
8481
- /* @__PURE__ */ React19.createElement(
8568
+ /* @__PURE__ */ React20.createElement(
8482
8569
  Heart,
8483
8570
  {
8484
8571
  className: `h-5 w-5 ${isFavorited ? "fill-red-500 text-red-500" : "text-slate-500"}`
8485
8572
  }
8486
8573
  ),
8487
8574
  isFavorited ? "Saved" : "Save for later"
8488
- ))), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold uppercase tracking-[0.25em]" }, "Need advice?"), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 leading-relaxed" }, "Chat with a pharmacist in real time before completing your purchase. We will help you choose supporting supplements and answer dosing questions.")))), relatedProducts.length > 0 && /* @__PURE__ */ React19.createElement("section", { className: "mt-20" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "You may also like"), /* @__PURE__ */ React19.createElement("p", { className: "mt-1 text-sm text-slate-500" }, "Hand-picked recommendations that pair nicely with this product.")), /* @__PURE__ */ React19.createElement(Link8, { href: "/shop", className: "hidden md:inline-flex" }, /* @__PURE__ */ React19.createElement(Button, { variant: "ghost", className: "text-primary-600" }, "View all products"))), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-4" }, relatedProducts?.map((relatedProduct) => /* @__PURE__ */ React19.createElement(ProductCard, { key: relatedProduct.id, product: relatedProduct })))))));
8575
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold uppercase tracking-[0.25em]" }, "Need advice?"), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 leading-relaxed" }, "Chat with a pharmacist in real time before completing your purchase. We will help you choose supporting supplements and answer dosing questions.")))), relatedProducts.length > 0 && /* @__PURE__ */ React20.createElement("section", { className: "mt-20" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "You may also like"), /* @__PURE__ */ React20.createElement("p", { className: "mt-1 text-sm text-slate-500" }, "Hand-picked recommendations that pair nicely with this product.")), /* @__PURE__ */ React20.createElement(Link8, { href: "/shop", className: "hidden md:inline-flex" }, /* @__PURE__ */ React20.createElement(Button, { variant: "ghost", className: "text-primary-600" }, "View all products"))), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-4" }, relatedProducts?.map((relatedProduct) => /* @__PURE__ */ React20.createElement(ProductCard, { key: relatedProduct.id, product: relatedProduct })))))));
8489
8576
  }
8490
8577
  function CartItem({ item }) {
8491
8578
  const { updateQuantity, removeFromCart } = useCart();
@@ -8503,7 +8590,7 @@ function CartItem({ item }) {
8503
8590
  await removeFromCart(item.productVariantId);
8504
8591
  };
8505
8592
  const itemTotal = item.productVariantData.finalPrice * item.quantity;
8506
- return /* @__PURE__ */ React19.createElement(
8593
+ return /* @__PURE__ */ React20.createElement(
8507
8594
  motion.div,
8508
8595
  {
8509
8596
  layout: true,
@@ -8512,7 +8599,7 @@ function CartItem({ item }) {
8512
8599
  exit: { opacity: 0, x: -100 },
8513
8600
  className: "flex gap-4 bg-white p-4 rounded-xl border border-gray-200 hover:border-primary-300 transition-colors"
8514
8601
  },
8515
- /* @__PURE__ */ React19.createElement("div", { className: "relative w-24 h-24 rounded-lg overflow-hidden flex-shrink-0 bg-gray-100" }, /* @__PURE__ */ React19.createElement(
8602
+ /* @__PURE__ */ React20.createElement("div", { className: "relative w-24 h-24 rounded-lg overflow-hidden flex-shrink-0 bg-gray-100" }, /* @__PURE__ */ React20.createElement(
8516
8603
  Image3,
8517
8604
  {
8518
8605
  src: item.productVariantData.productMedia[0]?.file || "/placeholder-product.jpg",
@@ -8521,46 +8608,47 @@ function CartItem({ item }) {
8521
8608
  className: "object-cover"
8522
8609
  }
8523
8610
  )),
8524
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900 truncate" }, item.productVariantData.name), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-gray-500 mt-1" }, formatPrice(item.productVariantData.finalPrice), " each"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3 mt-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center border-2 border-gray-200 rounded-lg" }, /* @__PURE__ */ React19.createElement(
8611
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900 truncate" }, item.productVariantData.name), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-gray-500 mt-1" }, formatPrice(item.productVariantData.finalPrice), " each"), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3 mt-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center border-2 border-gray-200 rounded-lg" }, /* @__PURE__ */ React20.createElement(
8525
8612
  "button",
8526
8613
  {
8527
8614
  onClick: () => handleUpdateQuantity(item.quantity - 1),
8528
8615
  disabled: isUpdating || item.quantity <= 0,
8529
8616
  className: "p-2 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
8530
8617
  },
8531
- /* @__PURE__ */ React19.createElement(Minus, { className: "w-4 h-4" })
8532
- ), /* @__PURE__ */ React19.createElement("span", { className: "px-4 font-medium min-w-[3rem] text-center" }, isUpdating ? /* @__PURE__ */ React19.createElement("span", { className: "inline-block h-4 w-4 align-middle animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }) : item.quantity), /* @__PURE__ */ React19.createElement(
8618
+ /* @__PURE__ */ React20.createElement(Minus, { className: "w-4 h-4" })
8619
+ ), /* @__PURE__ */ React20.createElement("span", { className: "px-4 font-medium min-w-[3rem] text-center" }, isUpdating ? /* @__PURE__ */ React20.createElement("span", { className: "inline-block h-4 w-4 align-middle animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }) : item.quantity), /* @__PURE__ */ React20.createElement(
8533
8620
  "button",
8534
8621
  {
8535
8622
  onClick: () => handleUpdateQuantity(item.quantity + 1),
8536
8623
  disabled: isUpdating || item.quantity >= item.productVariantData.inventoryCount,
8537
8624
  className: "p-2 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
8538
8625
  },
8539
- /* @__PURE__ */ React19.createElement(Plus, { className: "w-4 h-4" })
8540
- )), /* @__PURE__ */ React19.createElement(
8626
+ /* @__PURE__ */ React20.createElement(Plus, { className: "w-4 h-4" })
8627
+ )), /* @__PURE__ */ React20.createElement(
8541
8628
  "button",
8542
8629
  {
8543
8630
  onClick: handleRemove,
8544
8631
  className: "p-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors",
8545
8632
  "aria-label": "Remove item"
8546
8633
  },
8547
- /* @__PURE__ */ React19.createElement(Trash2, { className: "w-5 h-5" })
8634
+ /* @__PURE__ */ React20.createElement(Trash2, { className: "w-5 h-5" })
8548
8635
  ))),
8549
- /* @__PURE__ */ React19.createElement("div", { className: "text-right" }, /* @__PURE__ */ React19.createElement("p", { className: "text-xl font-bold text-gray-900" }, formatPrice(itemTotal)))
8636
+ /* @__PURE__ */ React20.createElement("div", { className: "text-right" }, /* @__PURE__ */ React20.createElement("p", { className: "text-xl font-bold text-gray-900" }, formatPrice(itemTotal)))
8550
8637
  );
8551
8638
  }
8552
8639
  function CartScreen() {
8553
8640
  const router = useRouter();
8554
8641
  const { cart, isLoading } = useCart();
8642
+ const { buildPath } = useBasePath();
8555
8643
  if (!cart || cart.cartBody.items.length === 0) {
8556
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-gradient-to-br from-primary-700 via-primary-600 to-secondary-600 flex items-center justify-center" }, /* @__PURE__ */ React19.createElement("div", { className: "mx-auto px-20 py-5 bg-white rounded-3xl" }, /* @__PURE__ */ React19.createElement(
8644
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-gradient-to-br from-primary-700 via-primary-600 to-secondary-600 flex items-center justify-center" }, /* @__PURE__ */ React20.createElement("div", { className: "mx-auto px-20 py-5 bg-white rounded-3xl" }, /* @__PURE__ */ React20.createElement(
8557
8645
  EmptyState,
8558
8646
  {
8559
8647
  icon: ShoppingBag,
8560
8648
  title: "Your bag feels a little empty",
8561
8649
  description: "Add pharmacy favorites to unlock quick shipping, curated bundles, and personalized recommendations.",
8562
8650
  actionLabel: "Discover products",
8563
- onAction: () => router.push("/shop")
8651
+ onAction: () => router.push(buildPath("/shop"))
8564
8652
  }
8565
8653
  )));
8566
8654
  }
@@ -8568,16 +8656,16 @@ function CartScreen() {
8568
8656
  const shipping = 0;
8569
8657
  const tax = 0;
8570
8658
  const total = subtotal + shipping + tax;
8571
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16 mb-8" }, /* @__PURE__ */ React19.createElement(
8659
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16 mb-8" }, /* @__PURE__ */ React20.createElement(
8572
8660
  motion.div,
8573
8661
  {
8574
8662
  initial: { opacity: 0, y: 24 },
8575
8663
  animate: { opacity: 1, y: 0 },
8576
8664
  className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between"
8577
8665
  },
8578
- /* @__PURE__ */ React19.createElement("div", { className: "max-w-2xl space-y-4" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold tracking-wide text-white/80 backdrop-blur" }, /* @__PURE__ */ React19.createElement(HeartPulse, { className: "h-4 w-4" }), "Wellness essentials, ready when you are"), /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Your curated cart"), /* @__PURE__ */ React19.createElement("p", { className: "text-white/75 md:text-lg" }, "Review your selections, unlock exclusive perks, and check out with pharmacist-backed confidence.")),
8579
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur-md" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Cart summary"), /* @__PURE__ */ React19.createElement("p", { className: "mt-4 text-4xl font-semibold" }, formatPrice(total)), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-white/70" }, "Taxes and shipping calculated below"))
8580
- ))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement(
8666
+ /* @__PURE__ */ React20.createElement("div", { className: "max-w-2xl space-y-4" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold tracking-wide text-white/80 backdrop-blur" }, /* @__PURE__ */ React20.createElement(HeartPulse, { className: "h-4 w-4" }), "Wellness essentials, ready when you are"), /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Your curated cart"), /* @__PURE__ */ React20.createElement("p", { className: "text-white/75 md:text-lg" }, "Review your selections, unlock exclusive perks, and check out with pharmacist-backed confidence.")),
8667
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur-md" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Cart summary"), /* @__PURE__ */ React20.createElement("p", { className: "mt-4 text-4xl font-semibold" }, formatPrice(total)), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-white/70" }, "Taxes and shipping calculated below"))
8668
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement(
8581
8669
  motion.section,
8582
8670
  {
8583
8671
  initial: { opacity: 0, y: 24 },
@@ -8585,10 +8673,10 @@ function CartScreen() {
8585
8673
  transition: { delay: 0.05 },
8586
8674
  className: "space-y-6 rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50"
8587
8675
  },
8588
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Items (", cart.cartBody.items.length, ")"), /* @__PURE__ */ React19.createElement("div", { className: "inline-flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-primary-700" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-4 w-4" }), "Guaranteed cold-chain handling")),
8589
- isLoading && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-block h-3 w-3 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600" }), "Updating cart\u2026"),
8590
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-5" }, cart.cartBody.items.map((item) => /* @__PURE__ */ React19.createElement(CartItem, { key: item.productVariantId, item })))
8591
- ), /* @__PURE__ */ React19.createElement(
8676
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Items (", cart.cartBody.items.length, ")"), /* @__PURE__ */ React20.createElement("div", { className: "inline-flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-primary-700" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-4 w-4" }), "Guaranteed cold-chain handling")),
8677
+ isLoading && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-block h-3 w-3 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600" }), "Updating cart\u2026"),
8678
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-5" }, cart.cartBody.items.map((item) => /* @__PURE__ */ React20.createElement(CartItem, { key: item.productVariantId, item })))
8679
+ ), /* @__PURE__ */ React20.createElement(
8592
8680
  motion.aside,
8593
8681
  {
8594
8682
  initial: { opacity: 0, y: 24 },
@@ -8596,25 +8684,25 @@ function CartScreen() {
8596
8684
  transition: { delay: 0.1 },
8597
8685
  className: "space-y-6 lg:sticky lg:top-28"
8598
8686
  },
8599
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Checkout summary"), /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold text-primary-700" }, /* @__PURE__ */ React19.createElement(BadgePercent, { className: "h-4 w-4" }), "Savings applied")), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("span", null, "Subtotal"), /* @__PURE__ */ React19.createElement("span", { className: "font-semibold text-slate-900" }, formatPrice(subtotal))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("span", null, "Shipping"), /* @__PURE__ */ React19.createElement("span", { className: "font-semibold" }, "Will be calculated at checkout")), /* @__PURE__ */ React19.createElement("div", { className: "rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between text-base font-semibold text-slate-900" }, /* @__PURE__ */ React19.createElement("span", null, "Order total"), /* @__PURE__ */ React19.createElement("span", null, formatPrice(total))), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-xs text-slate-500" }, "Prices include pharmacy-grade quality control and packaging."))), /* @__PURE__ */ React19.createElement(
8687
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Checkout summary"), /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold text-primary-700" }, /* @__PURE__ */ React20.createElement(BadgePercent, { className: "h-4 w-4" }), "Savings applied")), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("span", null, "Subtotal"), /* @__PURE__ */ React20.createElement("span", { className: "font-semibold text-slate-900" }, formatPrice(subtotal))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("span", null, "Shipping"), /* @__PURE__ */ React20.createElement("span", { className: "font-semibold" }, "Will be calculated at checkout")), /* @__PURE__ */ React20.createElement("div", { className: "rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between text-base font-semibold text-slate-900" }, /* @__PURE__ */ React20.createElement("span", null, "Order total"), /* @__PURE__ */ React20.createElement("span", null, formatPrice(total))), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-xs text-slate-500" }, "Prices include pharmacy-grade quality control and packaging."))), /* @__PURE__ */ React20.createElement(
8600
8688
  Button,
8601
8689
  {
8602
8690
  size: "lg",
8603
8691
  className: "mt-6 w-full",
8604
- onClick: () => router.push("/checkout")
8692
+ onClick: () => router.push(buildPath("/checkout"))
8605
8693
  },
8606
8694
  "Secure checkout",
8607
- /* @__PURE__ */ React19.createElement(ArrowRight, { className: "h-5 w-5" })
8608
- ), /* @__PURE__ */ React19.createElement(
8695
+ /* @__PURE__ */ React20.createElement(ArrowRight, { className: "h-5 w-5" })
8696
+ ), /* @__PURE__ */ React20.createElement(
8609
8697
  "button",
8610
8698
  {
8611
8699
  type: "button",
8612
- onClick: () => router.push("/shop"),
8700
+ onClick: () => router.push(buildPath("/shop")),
8613
8701
  className: "mt-4 w-full text-sm font-semibold text-primary-600 transition hover:text-primary-700"
8614
8702
  },
8615
8703
  "Continue shopping"
8616
8704
  )),
8617
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Need help?"), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 leading-relaxed" }, "Chat with a pharmacist to optimize your regimen or discuss substitutions before you check out."))
8705
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Need help?"), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 leading-relaxed" }, "Chat with a pharmacist to optimize your regimen or discuss substitutions before you check out."))
8618
8706
  )))));
8619
8707
  }
8620
8708
  function useAddresses() {
@@ -8676,7 +8764,7 @@ function useAddresses() {
8676
8764
  };
8677
8765
  }
8678
8766
  function Card({ className = "", ...props }) {
8679
- return /* @__PURE__ */ React19.createElement(
8767
+ return /* @__PURE__ */ React20.createElement(
8680
8768
  "div",
8681
8769
  {
8682
8770
  className: `rounded-lg border bg-white shadow-sm ${className}`,
@@ -8701,7 +8789,7 @@ function Modal({ isOpen, onClose, title, children, size = "md" }) {
8701
8789
  lg: "max-w-2xl",
8702
8790
  xl: "max-w-4xl"
8703
8791
  };
8704
- return /* @__PURE__ */ React19.createElement(AnimatePresence, null, isOpen && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
8792
+ return /* @__PURE__ */ React20.createElement(AnimatePresence, null, isOpen && /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
8705
8793
  motion.div,
8706
8794
  {
8707
8795
  initial: { opacity: 0 },
@@ -8710,7 +8798,7 @@ function Modal({ isOpen, onClose, title, children, size = "md" }) {
8710
8798
  onClick: onClose,
8711
8799
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm z-50"
8712
8800
  }
8713
- ), /* @__PURE__ */ React19.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4" }, /* @__PURE__ */ React19.createElement(
8801
+ ), /* @__PURE__ */ React20.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4" }, /* @__PURE__ */ React20.createElement(
8714
8802
  motion.div,
8715
8803
  {
8716
8804
  initial: { opacity: 0, scale: 0.95, y: 20 },
@@ -8718,15 +8806,15 @@ function Modal({ isOpen, onClose, title, children, size = "md" }) {
8718
8806
  exit: { opacity: 0, scale: 0.95, y: 20 },
8719
8807
  className: `bg-white rounded-2xl shadow-2xl w-full ${sizes[size]} max-h-[90vh] overflow-hidden flex flex-col`
8720
8808
  },
8721
- title && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between p-6 border-b border-gray-200" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-2xl font-bold text-gray-900" }, title), /* @__PURE__ */ React19.createElement(
8809
+ title && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between p-6 border-b border-gray-200" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-2xl font-bold text-gray-900" }, title), /* @__PURE__ */ React20.createElement(
8722
8810
  "button",
8723
8811
  {
8724
8812
  onClick: onClose,
8725
8813
  className: "p-2 hover:bg-gray-100 rounded-lg transition-colors"
8726
8814
  },
8727
- /* @__PURE__ */ React19.createElement(X, { className: "w-5 h-5" })
8815
+ /* @__PURE__ */ React20.createElement(X, { className: "w-5 h-5" })
8728
8816
  )),
8729
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1 overflow-y-auto p-6" }, children)
8817
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1 overflow-y-auto p-6" }, children)
8730
8818
  ))));
8731
8819
  }
8732
8820
  var addressSchema = z.object({
@@ -8897,7 +8985,7 @@ var PAYMENT_METHODS = [
8897
8985
  {
8898
8986
  label: "Card",
8899
8987
  value: "Card",
8900
- icon: /* @__PURE__ */ React19.createElement(CreditCard, { className: "w-5 h-5" }),
8988
+ icon: /* @__PURE__ */ React20.createElement(CreditCard, { className: "w-5 h-5" }),
8901
8989
  description: "Pay securely with your credit or debit card",
8902
8990
  className: "border-blue-500 hover:bg-blue-50",
8903
8991
  activeClass: "bg-blue-50 border-blue-500 text-blue-700"
@@ -8905,7 +8993,7 @@ var PAYMENT_METHODS = [
8905
8993
  {
8906
8994
  label: "Cash",
8907
8995
  value: "Cash",
8908
- icon: /* @__PURE__ */ React19.createElement(PackageCheck, { className: "w-5 h-5" }),
8996
+ icon: /* @__PURE__ */ React20.createElement(PackageCheck, { className: "w-5 h-5" }),
8909
8997
  description: "Pay with cash on delivery or at pickup",
8910
8998
  className: "border-amber-500 hover:bg-amber-50",
8911
8999
  activeClass: "bg-amber-50 border-amber-500 text-amber-700"
@@ -8913,7 +9001,7 @@ var PAYMENT_METHODS = [
8913
9001
  {
8914
9002
  label: "Credit",
8915
9003
  value: "Credit",
8916
- icon: /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "w-5 h-5" }),
9004
+ icon: /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "w-5 h-5" }),
8917
9005
  description: "Use your account credit",
8918
9006
  className: "border-emerald-500 hover:bg-emerald-50",
8919
9007
  activeClass: "bg-emerald-50 border-emerald-500 text-emerald-700"
@@ -8923,6 +9011,7 @@ function CheckoutScreen() {
8923
9011
  const router = useRouter();
8924
9012
  const { cart, clearCart } = useCart();
8925
9013
  const { isAuthenticated, user } = useAuth();
9014
+ const { buildPath } = useBasePath();
8926
9015
  const [isSubmitting, setIsSubmitting] = useState(false);
8927
9016
  const [isDelivery, setIsDelivery] = useState(true);
8928
9017
  const [paymentMethod, setPaymentMethod] = useState("Card");
@@ -9065,7 +9154,7 @@ function CheckoutScreen() {
9065
9154
  setError(null);
9066
9155
  if (!isAuthenticated) {
9067
9156
  toast.error("Please login to continue");
9068
- setTimeout(() => router.push("/login?redirect=/checkout"), 50);
9157
+ setTimeout(() => router.push(buildPath("/login?redirect=/checkout")), 50);
9069
9158
  return;
9070
9159
  }
9071
9160
  if (!cart || cart?.cartBody?.items?.length === 0 || !cart?.cartBody?.items) {
@@ -9116,7 +9205,7 @@ function CheckoutScreen() {
9116
9205
  }
9117
9206
  }
9118
9207
  setIsSubmitting(true);
9119
- toast("Submitting order...", { icon: /* @__PURE__ */ React19.createElement(CreditCard, { className: "h-4 w-4" }) });
9208
+ toast("Submitting order...", { icon: /* @__PURE__ */ React20.createElement(CreditCard, { className: "h-4 w-4" }) });
9120
9209
  try {
9121
9210
  const items = (cart?.cartBody?.items || []).map((item) => ({
9122
9211
  productVariantId: String(item.productVariantId),
@@ -9160,11 +9249,11 @@ function CheckoutScreen() {
9160
9249
  }
9161
9250
  toast.success("Order placed successfully!");
9162
9251
  await clearCart();
9163
- router.push(`/orders/${response.data?.id}`);
9252
+ router.push(buildPath(`/orders/${response.data?.id}`));
9164
9253
  } else {
9165
9254
  toast.success("Order placed successfully!");
9166
9255
  await clearCart();
9167
- router.push(`/orders/${response.data?.id}`);
9256
+ router.push(buildPath(`/orders/${response.data?.id}`));
9168
9257
  }
9169
9258
  } catch (err) {
9170
9259
  const msg = err?.message || err?.response?.data?.message || "Failed to place order";
@@ -9175,39 +9264,39 @@ function CheckoutScreen() {
9175
9264
  }
9176
9265
  };
9177
9266
  if (!cart || cart?.cartBody?.items?.length === 0 || !cart?.cartBody?.items) {
9178
- router.push("/cart");
9267
+ router.push(buildPath("/cart"));
9179
9268
  return null;
9180
9269
  }
9181
9270
  const subtotal = cart.total;
9182
9271
  const tax = 0;
9183
9272
  const total = subtotal + shippingPrice + tax;
9184
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement(
9273
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement(
9185
9274
  motion.div,
9186
9275
  {
9187
9276
  initial: { opacity: 0, y: 24 },
9188
9277
  animate: { opacity: 1, y: 0 },
9189
9278
  className: "space-y-6"
9190
9279
  },
9191
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-4 w-4" }), "Secure checkout"),
9192
- /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Provide delivery details"),
9193
- /* @__PURE__ */ React19.createElement("p", { className: "text-white/75 md:text-lg" }, "Our pharmacists handle every package with care. Share your shipping and billing information so we can dispatch your order within the next 12 hours."),
9194
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-3" }, checkoutSteps.map((step) => /* @__PURE__ */ React19.createElement(
9280
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-4 w-4" }), "Secure checkout"),
9281
+ /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Provide delivery details"),
9282
+ /* @__PURE__ */ React20.createElement("p", { className: "text-white/75 md:text-lg" }, "Our pharmacists handle every package with care. Share your shipping and billing information so we can dispatch your order within the next 12 hours."),
9283
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-3" }, checkoutSteps.map((step) => /* @__PURE__ */ React20.createElement(
9195
9284
  "div",
9196
9285
  {
9197
9286
  key: step.id,
9198
9287
  className: `flex items-center gap-3 rounded-2xl px-4 py-2 text-sm font-semibold ${step.status === "complete" ? "bg-white/20 text-white" : step.status === "current" ? "bg-white text-primary-700" : "bg-white/10 text-white/60"}`
9199
9288
  },
9200
- /* @__PURE__ */ React19.createElement("span", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-white/20 text-xs font-bold" }, step.id),
9289
+ /* @__PURE__ */ React20.createElement("span", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-white/20 text-xs font-bold" }, step.id),
9201
9290
  step.label
9202
9291
  )))
9203
- )))), /* @__PURE__ */ React19.createElement("form", { onSubmit: handleSubmit(onSubmit) }, error && /* @__PURE__ */ React19.createElement("div", { className: "mb-4 text-red-600 font-semibold" }, error), /* @__PURE__ */ React19.createElement("div", { className: "pt-12 container mx-auto grid gap-10 px-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React19.createElement(
9292
+ )))), /* @__PURE__ */ React20.createElement("form", { onSubmit: handleSubmit(onSubmit) }, error && /* @__PURE__ */ React20.createElement("div", { className: "mb-4 text-red-600 font-semibold" }, error), /* @__PURE__ */ React20.createElement("div", { className: "pt-12 container mx-auto grid gap-10 px-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]" }, /* @__PURE__ */ React20.createElement(
9204
9293
  motion.div,
9205
9294
  {
9206
9295
  initial: { opacity: 0, y: 24 },
9207
9296
  animate: { opacity: 1, y: 0 },
9208
9297
  className: "space-y-8"
9209
9298
  },
9210
- /* @__PURE__ */ React19.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Shipping information"), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, "We use temperature-aware packaging and real-time tracking on every shipment.")), /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-primary-700" }, /* @__PURE__ */ React19.createElement(Truck, { className: "h-4 w-4" }), "Dispatch in 12h")), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 grid grid-cols-1 gap-4 md:grid-cols-2" }, isDelivery && /* @__PURE__ */ React19.createElement("div", { className: "md:col-span-2 space-y-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("label", { className: "block font-semibold" }, "Select Address"), /* @__PURE__ */ React19.createElement(
9299
+ /* @__PURE__ */ React20.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center justify-between gap-4" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Shipping information"), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, "We use temperature-aware packaging and real-time tracking on every shipment.")), /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-primary-700" }, /* @__PURE__ */ React20.createElement(Truck, { className: "h-4 w-4" }), "Dispatch in 12h")), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 grid grid-cols-1 gap-4 md:grid-cols-2" }, isDelivery && /* @__PURE__ */ React20.createElement("div", { className: "md:col-span-2 space-y-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("label", { className: "block font-semibold" }, "Select Address"), /* @__PURE__ */ React20.createElement(
9211
9300
  Button,
9212
9301
  {
9213
9302
  type: "button",
@@ -9218,15 +9307,15 @@ function CheckoutScreen() {
9218
9307
  setIsAddressModalOpen(true);
9219
9308
  }
9220
9309
  },
9221
- /* @__PURE__ */ React19.createElement(Plus, { className: "h-4 w-4 mr-2" }),
9310
+ /* @__PURE__ */ React20.createElement(Plus, { className: "h-4 w-4 mr-2" }),
9222
9311
  "Add New Address"
9223
- )), userAddresses.length > 0 ? /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4" }, userAddresses.map((addr) => /* @__PURE__ */ React19.createElement(
9312
+ )), userAddresses.length > 0 ? /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4" }, userAddresses.map((addr) => /* @__PURE__ */ React20.createElement(
9224
9313
  "label",
9225
9314
  {
9226
9315
  key: addr.id,
9227
9316
  className: `group relative flex items-start gap-3 p-4 rounded-2xl border ${selectedAddressId === addr.id ? "border-primary-500 bg-primary-50 shadow-sm" : "border-slate-200 bg-white"} cursor-pointer hover:border-primary-300 transition-colors`
9228
9317
  },
9229
- /* @__PURE__ */ React19.createElement(
9318
+ /* @__PURE__ */ React20.createElement(
9230
9319
  "input",
9231
9320
  {
9232
9321
  type: "radio",
@@ -9247,7 +9336,7 @@ function CheckoutScreen() {
9247
9336
  className: "mt-1"
9248
9337
  }
9249
9338
  ),
9250
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-900" }, addr.name), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-600" }, addr.street1), addr.street2 && /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-600" }, addr.street2), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-600" }, addr.city, ", ", addr.state, " ", addr.zip), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-600" }, addr.country), addr.phone && /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-600 mt-1" }, addr.phone), /* @__PURE__ */ React19.createElement("div", { className: "mt-3 flex items-center gap-2" }, addr.isDefault && /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary-100 px-2.5 py-0.5 text-xs font-semibold text-primary-700" }, "Default"), /* @__PURE__ */ React19.createElement(
9339
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-900" }, addr.name), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-600" }, addr.street1), addr.street2 && /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-600" }, addr.street2), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-600" }, addr.city, ", ", addr.state, " ", addr.zip), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-600" }, addr.country), addr.phone && /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-600 mt-1" }, addr.phone), /* @__PURE__ */ React20.createElement("div", { className: "mt-3 flex items-center gap-2" }, addr.isDefault && /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary-100 px-2.5 py-0.5 text-xs font-semibold text-primary-700" }, "Default"), /* @__PURE__ */ React20.createElement(
9251
9340
  "button",
9252
9341
  {
9253
9342
  type: "button",
@@ -9258,9 +9347,9 @@ function CheckoutScreen() {
9258
9347
  },
9259
9348
  className: "inline-flex items-center gap-1 rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-medium text-slate-600 hover:border-primary-300 hover:text-primary-600"
9260
9349
  },
9261
- /* @__PURE__ */ React19.createElement(Edit3, { className: "h-3.5 w-3.5" }),
9350
+ /* @__PURE__ */ React20.createElement(Edit3, { className: "h-3.5 w-3.5" }),
9262
9351
  " Edit"
9263
- ), /* @__PURE__ */ React19.createElement(
9352
+ ), /* @__PURE__ */ React20.createElement(
9264
9353
  "button",
9265
9354
  {
9266
9355
  type: "button",
@@ -9278,23 +9367,23 @@ function CheckoutScreen() {
9278
9367
  },
9279
9368
  className: "inline-flex items-center gap-1 rounded-full border border-red-200 px-2.5 py-0.5 text-xs font-semibold text-red-600 hover:border-red-300 hover:text-red-700"
9280
9369
  },
9281
- /* @__PURE__ */ React19.createElement(Trash2, { className: "h-3.5 w-3.5" }),
9370
+ /* @__PURE__ */ React20.createElement(Trash2, { className: "h-3.5 w-3.5" }),
9282
9371
  " Delete"
9283
9372
  )))
9284
- ))) : /* @__PURE__ */ React19.createElement("div", { className: "text-center py-8 bg-slate-50 rounded-lg" }, /* @__PURE__ */ React19.createElement(MapPin, { className: "h-12 w-12 mx-auto text-slate-400" }), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 text-slate-600" }, "No addresses found"), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, "Add a new address to continue"))), !isDelivery && storeAddresses.length > 0 && /* @__PURE__ */ React19.createElement("div", { className: "md:col-span-2" }, /* @__PURE__ */ React19.createElement("label", { className: "block mb-2 font-semibold" }, "Select Pickup Location"), /* @__PURE__ */ React19.createElement(
9373
+ ))) : /* @__PURE__ */ React20.createElement("div", { className: "text-center py-8 bg-slate-50 rounded-lg" }, /* @__PURE__ */ React20.createElement(MapPin, { className: "h-12 w-12 mx-auto text-slate-400" }), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 text-slate-600" }, "No addresses found"), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, "Add a new address to continue"))), !isDelivery && storeAddresses.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "md:col-span-2" }, /* @__PURE__ */ React20.createElement("label", { className: "block mb-2 font-semibold" }, "Select Pickup Location"), /* @__PURE__ */ React20.createElement(
9285
9374
  "select",
9286
9375
  {
9287
9376
  className: "w-full border rounded p-2",
9288
9377
  value: selectedStoreAddressId || "",
9289
9378
  onChange: (e) => setSelectedStoreAddressId(e.target.value)
9290
9379
  },
9291
- storeAddresses.map((addr) => /* @__PURE__ */ React19.createElement("option", { key: addr.id, value: addr.id }, addr.name, " - ", addr.street1, ", ", addr.city))
9380
+ storeAddresses.map((addr) => /* @__PURE__ */ React20.createElement("option", { key: addr.id, value: addr.id }, addr.name, " - ", addr.street1, ", ", addr.city))
9292
9381
  )))),
9293
- isDelivery && selectedAddressId && /* @__PURE__ */ React19.createElement(Card, { className: "p-6 border border-gray-200 rounded-xl shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3 text-xl font-semibold text-gray-900 pb-4 mb-6 border-b" }, /* @__PURE__ */ React19.createElement(Truck, { className: "text-accent w-6 h-6" }), /* @__PURE__ */ React19.createElement("span", null, "Shipping Options")), shippingRatesLoading ? /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-center py-12" }, /* @__PURE__ */ React19.createElement("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-accent" }), /* @__PURE__ */ React19.createElement("span", { className: "ml-3 text-gray-600" }, "Loading shipping options...")) : shippingRatesError ? /* @__PURE__ */ React19.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React19.createElement("div", { className: "w-16 h-16 mx-auto mb-4 bg-red-100 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React19.createElement("svg", { className: "w-8 h-8 text-red-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React19.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }))), /* @__PURE__ */ React19.createElement("p", { className: "text-red-500 text-lg font-medium" }, "Error loading shipping options"), /* @__PURE__ */ React19.createElement("p", { className: "text-red-400 text-sm mt-1" }, shippingRatesError)) : shippingRates && shippingRates.length > 0 ? /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, shippingRates.map((rate) => {
9382
+ isDelivery && selectedAddressId && /* @__PURE__ */ React20.createElement(Card, { className: "p-6 border border-gray-200 rounded-xl shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3 text-xl font-semibold text-gray-900 pb-4 mb-6 border-b" }, /* @__PURE__ */ React20.createElement(Truck, { className: "text-accent w-6 h-6" }), /* @__PURE__ */ React20.createElement("span", null, "Shipping Options")), shippingRatesLoading ? /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-center py-12" }, /* @__PURE__ */ React20.createElement("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-accent" }), /* @__PURE__ */ React20.createElement("span", { className: "ml-3 text-gray-600" }, "Loading shipping options...")) : shippingRatesError ? /* @__PURE__ */ React20.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React20.createElement("div", { className: "w-16 h-16 mx-auto mb-4 bg-red-100 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React20.createElement("svg", { className: "w-8 h-8 text-red-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }))), /* @__PURE__ */ React20.createElement("p", { className: "text-red-500 text-lg font-medium" }, "Error loading shipping options"), /* @__PURE__ */ React20.createElement("p", { className: "text-red-400 text-sm mt-1" }, shippingRatesError)) : shippingRates && shippingRates.length > 0 ? /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, shippingRates.map((rate) => {
9294
9383
  const isSelected = !!selectedShippingRateId && selectedShippingRateId === rate.objectId;
9295
9384
  const isTest = rate.test;
9296
9385
  const hasAttributes = rate.attributes && rate.attributes.length > 0;
9297
- return /* @__PURE__ */ React19.createElement(
9386
+ return /* @__PURE__ */ React20.createElement(
9298
9387
  "div",
9299
9388
  {
9300
9389
  key: rate.objectId,
@@ -9303,7 +9392,7 @@ function CheckoutScreen() {
9303
9392
  onMouseLeave: () => setShippingPrice(parseFloat(rate.amountLocal)),
9304
9393
  className: `relative p-5 border-2 rounded-xl cursor-pointer transition-all duration-200 hover:shadow-md ${isSelected ? "border-primary-500 bg-primary-50 ring-2 ring-primary-200" : "border-gray-200 hover:border-gray-300"}`
9305
9394
  },
9306
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-start justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-4 flex-1" }, /* @__PURE__ */ React19.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React19.createElement(
9395
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-start justify-between" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-4 flex-1" }, /* @__PURE__ */ React20.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React20.createElement(
9307
9396
  Image3,
9308
9397
  {
9309
9398
  src: rate.providerImage75 || "/placeholder-product.jpg",
@@ -9316,18 +9405,18 @@ function CheckoutScreen() {
9316
9405
  width: 48,
9317
9406
  height: 48
9318
9407
  }
9319
- )), /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, rate.provider, " ", rate.servicelevel?.name), isTest && /* @__PURE__ */ React19.createElement("span", { className: "px-2 py-1 text-xs font-medium bg-orange-100 text-orange-800 rounded-full" }, "TEST")), hasAttributes && /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2 mb-3" }, rate.attributes.map((attr) => /* @__PURE__ */ React19.createElement(
9408
+ )), /* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, rate.provider, " ", rate.servicelevel?.name), isTest && /* @__PURE__ */ React20.createElement("span", { className: "px-2 py-1 text-xs font-medium bg-orange-100 text-orange-800 rounded-full" }, "TEST")), hasAttributes && /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2 mb-3" }, rate.attributes.map((attr) => /* @__PURE__ */ React20.createElement(
9320
9409
  "span",
9321
9410
  {
9322
9411
  key: attr,
9323
9412
  className: `px-2 py-1 text-xs font-medium rounded-full ${attr === "FASTEST" ? "bg-green-100 text-green-800" : attr === "BESTVALUE" ? "bg-blue-100 text-blue-800" : attr === "CHEAPEST" ? "bg-purple-100 text-purple-800" : "bg-gray-100 text-gray-800"}`
9324
9413
  },
9325
9414
  attr
9326
- ))), /* @__PURE__ */ React19.createElement("div", { className: "space-y-1 text-sm text-gray-600" }, rate.durationTerms && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React19.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React19.createElement("span", null, rate.durationTerms)), rate.estimatedDays && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React19.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React19.createElement("span", null, "Estimated ", rate.estimatedDays, " day", rate.estimatedDays !== 1 ? "s" : "")), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React19.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" })), /* @__PURE__ */ React19.createElement("span", null, "Carrier: ", rate.provider)), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React19.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1" })), /* @__PURE__ */ React19.createElement("span", null, "Currency: ", rate.currency))))), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-end" }, /* @__PURE__ */ React19.createElement("div", { className: "text-2xl font-bold text-gray-900" }, formatPrice(parseFloat(rate.amount))), rate.amount !== rate.amountLocal && /* @__PURE__ */ React19.createElement("div", { className: "text-sm text-gray-500" }, rate.amountLocal, " ", rate.currencyLocal))),
9327
- isSelected && /* @__PURE__ */ React19.createElement("div", { className: "absolute top-3 right-3" }, /* @__PURE__ */ React19.createElement("div", { className: "w-6 h-6 bg-primary-500 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React19.createElement(Check, { className: "w-4 h-4 text-white" })))
9415
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "space-y-1 text-sm text-gray-600" }, rate.durationTerms && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React20.createElement("span", null, rate.durationTerms)), rate.estimatedDays && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React20.createElement("span", null, "Estimated ", rate.estimatedDays, " day", rate.estimatedDays !== 1 ? "s" : "")), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" })), /* @__PURE__ */ React20.createElement("span", null, "Carrier: ", rate.provider)), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1" })), /* @__PURE__ */ React20.createElement("span", null, "Currency: ", rate.currency))))), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col items-end" }, /* @__PURE__ */ React20.createElement("div", { className: "text-2xl font-bold text-gray-900" }, formatPrice(parseFloat(rate.amount))), rate.amount !== rate.amountLocal && /* @__PURE__ */ React20.createElement("div", { className: "text-sm text-gray-500" }, rate.amountLocal, " ", rate.currencyLocal))),
9416
+ isSelected && /* @__PURE__ */ React20.createElement("div", { className: "absolute top-3 right-3" }, /* @__PURE__ */ React20.createElement("div", { className: "w-6 h-6 bg-primary-500 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React20.createElement(Check, { className: "w-4 h-4 text-white" })))
9328
9417
  );
9329
- })) : /* @__PURE__ */ React19.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React19.createElement("div", { className: "w-16 h-16 mx-auto mb-4 bg-gray-100 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React19.createElement(Truck, { className: "w-8 h-8 text-gray-400" })), /* @__PURE__ */ React19.createElement("p", { className: "text-gray-500 text-lg font-medium" }, "No shipping options available"), /* @__PURE__ */ React19.createElement("p", { className: "text-gray-400 text-sm mt-1" }, "Please check the shipping address or try a different location.")))
9330
- ), /* @__PURE__ */ React19.createElement(
9418
+ })) : /* @__PURE__ */ React20.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React20.createElement("div", { className: "w-16 h-16 mx-auto mb-4 bg-gray-100 rounded-full flex items-center justify-center" }, /* @__PURE__ */ React20.createElement(Truck, { className: "w-8 h-8 text-gray-400" })), /* @__PURE__ */ React20.createElement("p", { className: "text-gray-500 text-lg font-medium" }, "No shipping options available"), /* @__PURE__ */ React20.createElement("p", { className: "text-gray-400 text-sm mt-1" }, "Please check the shipping address or try a different location.")))
9419
+ ), /* @__PURE__ */ React20.createElement(
9331
9420
  motion.aside,
9332
9421
  {
9333
9422
  initial: { opacity: 0, y: 32 },
@@ -9335,22 +9424,22 @@ function CheckoutScreen() {
9335
9424
  transition: { duration: 0.5, ease: "easeOut", delay: 0.1 },
9336
9425
  className: "space-y-10 lg:sticky lg:top-24"
9337
9426
  },
9338
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-xl shadow-primary-50/50 transition hover:shadow-primary-100/60" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "Order Summary"), /* @__PURE__ */ React19.createElement("section", { className: "mt-6 space-y-4" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-xs font-semibold text-slate-700 uppercase tracking-wider" }, "Delivery Method"), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 gap-3" }, [
9427
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-xl shadow-primary-50/50 transition hover:shadow-primary-100/60" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "Order Summary"), /* @__PURE__ */ React20.createElement("section", { className: "mt-6 space-y-4" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-xs font-semibold text-slate-700 uppercase tracking-wider" }, "Delivery Method"), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-1 gap-3" }, [
9339
9428
  {
9340
9429
  label: "Delivery",
9341
- icon: /* @__PURE__ */ React19.createElement(Truck, { className: "w-5 h-5" }),
9430
+ icon: /* @__PURE__ */ React20.createElement(Truck, { className: "w-5 h-5" }),
9342
9431
  value: true,
9343
9432
  desc: "Shipped to your address"
9344
9433
  },
9345
9434
  {
9346
9435
  label: "Pickup",
9347
- icon: /* @__PURE__ */ React19.createElement(MapPin, { className: "w-5 h-5" }),
9436
+ icon: /* @__PURE__ */ React20.createElement(MapPin, { className: "w-5 h-5" }),
9348
9437
  value: false,
9349
9438
  desc: "Collect from pharmacy"
9350
9439
  }
9351
9440
  ].map((option) => {
9352
9441
  const active = isDelivery === option.value;
9353
- return /* @__PURE__ */ React19.createElement(
9442
+ return /* @__PURE__ */ React20.createElement(
9354
9443
  "button",
9355
9444
  {
9356
9445
  key: option.label,
@@ -9359,18 +9448,18 @@ function CheckoutScreen() {
9359
9448
  "aria-pressed": active,
9360
9449
  className: `relative flex w-full items-center justify-between rounded-xl border-2 p-3 transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 ${active ? "border-primary-500 bg-primary-50 shadow-sm" : "border-slate-200 bg-white hover:border-primary-200 hover:bg-primary-50/40"}`
9361
9450
  },
9362
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(
9451
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(
9363
9452
  "div",
9364
9453
  {
9365
9454
  className: `p-2 rounded-lg ${active ? "bg-primary-100 text-primary-600" : "bg-slate-100 text-slate-600 group-hover:bg-slate-50"}`
9366
9455
  },
9367
9456
  option.icon
9368
- ), /* @__PURE__ */ React19.createElement("div", { className: "text-left" }, /* @__PURE__ */ React19.createElement("div", { className: "font-medium text-slate-900" }, option.label), /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-slate-500" }, option.desc))),
9369
- active && /* @__PURE__ */ React19.createElement("div", { className: "w-5 h-5 rounded-full bg-primary-500 flex items-center justify-center text-white shadow-sm" }, /* @__PURE__ */ React19.createElement(Check, { className: "w-3 h-3" }))
9457
+ ), /* @__PURE__ */ React20.createElement("div", { className: "text-left" }, /* @__PURE__ */ React20.createElement("div", { className: "font-medium text-slate-900" }, option.label), /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-slate-500" }, option.desc))),
9458
+ active && /* @__PURE__ */ React20.createElement("div", { className: "w-5 h-5 rounded-full bg-primary-500 flex items-center justify-center text-white shadow-sm" }, /* @__PURE__ */ React20.createElement(Check, { className: "w-3 h-3" }))
9370
9459
  );
9371
- }))), /* @__PURE__ */ React19.createElement("section", { className: "mt-8 space-y-4" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-xs font-semibold text-slate-700 uppercase tracking-wider" }, "Payment Method"), /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, PAYMENT_METHODS.map((pm) => {
9460
+ }))), /* @__PURE__ */ React20.createElement("section", { className: "mt-8 space-y-4" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-xs font-semibold text-slate-700 uppercase tracking-wider" }, "Payment Method"), /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, PAYMENT_METHODS.map((pm) => {
9372
9461
  const active = paymentMethod === pm.value;
9373
- return /* @__PURE__ */ React19.createElement(
9462
+ return /* @__PURE__ */ React20.createElement(
9374
9463
  "button",
9375
9464
  {
9376
9465
  key: pm.value,
@@ -9378,22 +9467,22 @@ function CheckoutScreen() {
9378
9467
  onClick: () => setPaymentMethod(pm.value),
9379
9468
  className: `w-full flex items-center justify-between rounded-xl border-2 p-3 transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ${active ? `${pm.activeClass} border-current shadow-sm` : `${pm.className} border-slate-200 hover:border-primary-200 hover:shadow-sm`}`
9380
9469
  },
9381
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(
9470
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(
9382
9471
  "div",
9383
9472
  {
9384
9473
  className: `p-1.5 rounded-md ${pm.value === "Card" ? "bg-blue-100 text-blue-600" : pm.value === "Cash" ? "bg-amber-100 text-amber-600" : "bg-emerald-100 text-emerald-600"} ${active ? "bg-opacity-30" : "bg-opacity-100"}`
9385
9474
  },
9386
9475
  pm.icon
9387
- ), /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-medium text-slate-900" }, pm.label)),
9388
- active && /* @__PURE__ */ React19.createElement("div", { className: "w-4 h-4 rounded-full bg-primary-500 flex items-center justify-center text-white shadow-sm" }, /* @__PURE__ */ React19.createElement(Check, { className: "w-2.5 h-2.5" }))
9476
+ ), /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-medium text-slate-900" }, pm.label)),
9477
+ active && /* @__PURE__ */ React20.createElement("div", { className: "w-4 h-4 rounded-full bg-primary-500 flex items-center justify-center text-white shadow-sm" }, /* @__PURE__ */ React20.createElement(Check, { className: "w-2.5 h-2.5" }))
9389
9478
  );
9390
- })), /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-slate-500 mt-2 pl-1 leading-relaxed" }, paymentMethod === "Card" && "You will be redirected to a secure payment page.", paymentMethod === "Cash" && "Pay with cash at the time of delivery or pickup.", paymentMethod === "Credit" && "Use your available account credit for this order.")), /* @__PURE__ */ React19.createElement("section", { className: "mt-8 pt-6 border-t border-slate-100" }, /* @__PURE__ */ React19.createElement("div", { className: "max-h-60 space-y-4 overflow-y-auto pr-2 scrollbar-thin scrollbar-thumb-slate-200 hover:scrollbar-thumb-slate-300" }, cart?.cartBody?.items?.map((item) => /* @__PURE__ */ React19.createElement(
9479
+ })), /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-slate-500 mt-2 pl-1 leading-relaxed" }, paymentMethod === "Card" && "You will be redirected to a secure payment page.", paymentMethod === "Cash" && "Pay with cash at the time of delivery or pickup.", paymentMethod === "Credit" && "Use your available account credit for this order.")), /* @__PURE__ */ React20.createElement("section", { className: "mt-8 pt-6 border-t border-slate-100" }, /* @__PURE__ */ React20.createElement("div", { className: "max-h-60 space-y-4 overflow-y-auto pr-2 scrollbar-thin scrollbar-thumb-slate-200 hover:scrollbar-thumb-slate-300" }, cart?.cartBody?.items?.map((item) => /* @__PURE__ */ React20.createElement(
9391
9480
  "div",
9392
9481
  {
9393
9482
  key: item.productId,
9394
9483
  className: "flex gap-4 rounded-2xl border border-slate-100 p-4 hover:bg-slate-50/50 transition"
9395
9484
  },
9396
- /* @__PURE__ */ React19.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-xl bg-slate-100 text-slate-400" }, /* @__PURE__ */ React19.createElement(
9485
+ /* @__PURE__ */ React20.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-xl bg-slate-100 text-slate-400" }, /* @__PURE__ */ React20.createElement(
9397
9486
  Image3,
9398
9487
  {
9399
9488
  src: item.productVariantData.productMedia?.[0]?.file || "/placeholder-product.jpg",
@@ -9403,9 +9492,9 @@ function CheckoutScreen() {
9403
9492
  className: "object-contain"
9404
9493
  }
9405
9494
  )),
9406
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold text-slate-900" }, item?.productVariantData?.name), /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-slate-500" }, "Qty ", item.quantity)),
9407
- /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold text-slate-900" }, formatPrice(item.productVariantData.finalPrice * item.quantity))
9408
- ))), /* @__PURE__ */ React19.createElement("div", { className: "mt-6 space-y-3 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("span", null, "Subtotal"), /* @__PURE__ */ React19.createElement("span", { className: "font-semibold text-slate-900" }, formatPrice(subtotal))), isDelivery && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("span", null, "Shipping"), /* @__PURE__ */ React19.createElement("span", { className: "font-semibold" }, formatPrice(shippingPrice))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("span", null, "Estimated tax"), /* @__PURE__ */ React19.createElement("span", { className: "font-semibold" }, formatPrice(tax))), /* @__PURE__ */ React19.createElement("div", { className: "rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between text-base font-semibold text-slate-900" }, /* @__PURE__ */ React19.createElement("span", null, "Total Due"), /* @__PURE__ */ React19.createElement("span", null, formatPrice(total))), /* @__PURE__ */ React19.createElement("p", { className: "mt-1 text-xs text-slate-500" }, "Tax is estimated. Final amount confirmed after payment.")))), /* @__PURE__ */ React19.createElement(
9495
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold text-slate-900" }, item?.productVariantData?.name), /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-slate-500" }, "Qty ", item.quantity)),
9496
+ /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold text-slate-900" }, formatPrice(item.productVariantData.finalPrice * item.quantity))
9497
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "mt-6 space-y-3 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("span", null, "Subtotal"), /* @__PURE__ */ React20.createElement("span", { className: "font-semibold text-slate-900" }, formatPrice(subtotal))), isDelivery && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("span", null, "Shipping"), /* @__PURE__ */ React20.createElement("span", { className: "font-semibold" }, formatPrice(shippingPrice))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("span", null, "Estimated tax"), /* @__PURE__ */ React20.createElement("span", { className: "font-semibold" }, formatPrice(tax))), /* @__PURE__ */ React20.createElement("div", { className: "rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between text-base font-semibold text-slate-900" }, /* @__PURE__ */ React20.createElement("span", null, "Total Due"), /* @__PURE__ */ React20.createElement("span", null, formatPrice(total))), /* @__PURE__ */ React20.createElement("p", { className: "mt-1 text-xs text-slate-500" }, "Tax is estimated. Final amount confirmed after payment.")))), /* @__PURE__ */ React20.createElement(
9409
9498
  Button,
9410
9499
  {
9411
9500
  type: "submit",
@@ -9413,11 +9502,11 @@ function CheckoutScreen() {
9413
9502
  isLoading: isSubmitting,
9414
9503
  className: "mt-6 w-full transition-transform hover:scale-[1.02] active:scale-[0.99]"
9415
9504
  },
9416
- /* @__PURE__ */ React19.createElement(CreditCard, { className: "h-5 w-5" }),
9505
+ /* @__PURE__ */ React20.createElement(CreditCard, { className: "h-5 w-5" }),
9417
9506
  isSubmitting ? "Placing order..." : "Place Secure Order"
9418
- ), /* @__PURE__ */ React19.createElement("p", { className: "mt-4 flex items-center justify-center gap-2 text-xs text-slate-500" }, /* @__PURE__ */ React19.createElement(Lock, { className: "h-4 w-4" }), "Fully encrypted checkout \u2014 cancel anytime before shipment.")),
9419
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/80 p-6 text-sm text-primary-700 shadow-sm hover:shadow-md transition-shadow" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold uppercase tracking-[0.3em] text-primary-800" }, "Why Patients Choose Us"), /* @__PURE__ */ React19.createElement("ul", { className: "mt-4 space-y-3 text-primary-700 leading-relaxed" }, /* @__PURE__ */ React19.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React19.createElement(PackageCheck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React19.createElement("span", null, "Pharmacy-grade verification on every order.")), /* @__PURE__ */ React19.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React19.createElement("span", null, "Cold-chain logistics for sensitive medications.")), /* @__PURE__ */ React19.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React19.createElement(Truck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React19.createElement("span", null, "Real-time tracking and SMS updates from prep to delivery."))))
9420
- ))), /* @__PURE__ */ React19.createElement(
9507
+ ), /* @__PURE__ */ React20.createElement("p", { className: "mt-4 flex items-center justify-center gap-2 text-xs text-slate-500" }, /* @__PURE__ */ React20.createElement(Lock, { className: "h-4 w-4" }), "Fully encrypted checkout \u2014 cancel anytime before shipment.")),
9508
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/80 p-6 text-sm text-primary-700 shadow-sm hover:shadow-md transition-shadow" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold uppercase tracking-[0.3em] text-primary-800" }, "Why Patients Choose Us"), /* @__PURE__ */ React20.createElement("ul", { className: "mt-4 space-y-3 text-primary-700 leading-relaxed" }, /* @__PURE__ */ React20.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React20.createElement(PackageCheck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React20.createElement("span", null, "Pharmacy-grade verification on every order.")), /* @__PURE__ */ React20.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React20.createElement("span", null, "Cold-chain logistics for sensitive medications.")), /* @__PURE__ */ React20.createElement("li", { className: "flex items-start gap-3" }, /* @__PURE__ */ React20.createElement(Truck, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ React20.createElement("span", null, "Real-time tracking and SMS updates from prep to delivery."))))
9509
+ ))), /* @__PURE__ */ React20.createElement(
9421
9510
  AddressFormModal,
9422
9511
  {
9423
9512
  isOpen: isAddressModalOpen,
@@ -9448,8 +9537,9 @@ var loginSchema = z.object({
9448
9537
  });
9449
9538
  function LoginScreen() {
9450
9539
  const router = useRouter();
9540
+ const { buildPath } = useBasePath();
9451
9541
  const searchParams = useSearchParams();
9452
- const redirectUrl = searchParams?.get("redirect") || "/";
9542
+ const redirectUrl = searchParams?.get("redirect") || buildPath("/");
9453
9543
  const { login } = useAuth();
9454
9544
  const [showPassword, setShowPassword] = useState(false);
9455
9545
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -9472,7 +9562,7 @@ function LoginScreen() {
9472
9562
  setIsSubmitting(false);
9473
9563
  }
9474
9564
  };
9475
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("div", { className: "grid min-h-screen overflow-hidden bg-white lg:grid-cols-[1.1fr_0.9fr]" }, /* @__PURE__ */ React19.createElement(
9565
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("div", { className: "grid min-h-screen overflow-hidden bg-white lg:grid-cols-[1.1fr_0.9fr]" }, /* @__PURE__ */ React20.createElement(
9476
9566
  motion.section,
9477
9567
  {
9478
9568
  initial: { opacity: 0, x: -24 },
@@ -9480,18 +9570,18 @@ function LoginScreen() {
9480
9570
  transition: { duration: 0.4 },
9481
9571
  className: "relative flex flex-col justify-between bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] px-10 py-14 text-white"
9482
9572
  },
9483
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(HeartPulse, { className: "h-4 w-4" }), "Hey Pharmacist"), /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold leading-tight lg:text-5xl" }, "Pharmacy-grade care for your household"), /* @__PURE__ */ React19.createElement("p", { className: "max-w-xl text-white/80" }, "Log in to unlock personalized regimens, pharmacist support, and fast delivery on wellness essentials curated just for you.")),
9484
- /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 rounded-3xl bg-white/10 p-6 backdrop-blur" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-white/80" }, "HIPAA-compliant security keeps your health information protected.")), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-white/80" }, "Pharmacists ready to chat in under 10 minutes for medication support."))),
9485
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React19.createElement("span", null, "Need an account?"), /* @__PURE__ */ React19.createElement(
9573
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(HeartPulse, { className: "h-4 w-4" }), "Hey Pharmacist"), /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold leading-tight lg:text-5xl" }, "Pharmacy-grade care for your household"), /* @__PURE__ */ React20.createElement("p", { className: "max-w-xl text-white/80" }, "Log in to unlock personalized regimens, pharmacist support, and fast delivery on wellness essentials curated just for you.")),
9574
+ /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 rounded-3xl bg-white/10 p-6 backdrop-blur" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-white/80" }, "HIPAA-compliant security keeps your health information protected.")), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-white/80" }, "Pharmacists ready to chat in under 10 minutes for medication support."))),
9575
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React20.createElement("span", null, "Need an account?"), /* @__PURE__ */ React20.createElement(
9486
9576
  Link8,
9487
9577
  {
9488
9578
  href: "/register",
9489
9579
  className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
9490
9580
  },
9491
9581
  "Create one now",
9492
- /* @__PURE__ */ React19.createElement(ArrowRight, { className: "h-4 w-4" })
9582
+ /* @__PURE__ */ React20.createElement(ArrowRight, { className: "h-4 w-4" })
9493
9583
  ))
9494
- ), /* @__PURE__ */ React19.createElement(
9584
+ ), /* @__PURE__ */ React20.createElement(
9495
9585
  motion.section,
9496
9586
  {
9497
9587
  initial: { opacity: 0, x: 24 },
@@ -9499,7 +9589,7 @@ function LoginScreen() {
9499
9589
  transition: { duration: 0.4 },
9500
9590
  className: "flex items-center justify-center px-6 py-12 lg:px-16"
9501
9591
  },
9502
- /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-md space-y-10" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-3xl font-bold text-slate-900" }, "Sign in"), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, "Welcome back! Enter your details to continue your personalized care plan.")), /* @__PURE__ */ React19.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6 rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement(
9592
+ /* @__PURE__ */ React20.createElement("div", { className: "w-full max-w-md space-y-10" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-3xl font-bold text-slate-900" }, "Sign in"), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, "Welcome back! Enter your details to continue your personalized care plan.")), /* @__PURE__ */ React20.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6 rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement(
9503
9593
  Input,
9504
9594
  {
9505
9595
  type: "email",
@@ -9508,7 +9598,7 @@ function LoginScreen() {
9508
9598
  ...register("email"),
9509
9599
  error: errors.email?.message
9510
9600
  }
9511
- )), /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
9601
+ )), /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
9512
9602
  Input,
9513
9603
  {
9514
9604
  type: showPassword ? "text" : "password",
@@ -9517,28 +9607,28 @@ function LoginScreen() {
9517
9607
  ...register("password"),
9518
9608
  error: errors.password?.message
9519
9609
  }
9520
- ), /* @__PURE__ */ React19.createElement(
9610
+ ), /* @__PURE__ */ React20.createElement(
9521
9611
  "button",
9522
9612
  {
9523
9613
  type: "button",
9524
9614
  onClick: () => setShowPassword((prev) => !prev),
9525
9615
  className: "absolute right-3 top-[42px] text-slate-400 transition hover:text-slate-600"
9526
9616
  },
9527
- showPassword ? /* @__PURE__ */ React19.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React19.createElement(Eye, { className: "h-5 w-5" })
9528
- )), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between text-sm" }, /* @__PURE__ */ React19.createElement("label", { className: "flex items-center gap-2 text-slate-600" }, /* @__PURE__ */ React19.createElement(
9617
+ showPassword ? /* @__PURE__ */ React20.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React20.createElement(Eye, { className: "h-5 w-5" })
9618
+ )), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between text-sm" }, /* @__PURE__ */ React20.createElement("label", { className: "flex items-center gap-2 text-slate-600" }, /* @__PURE__ */ React20.createElement(
9529
9619
  "input",
9530
9620
  {
9531
9621
  type: "checkbox",
9532
9622
  className: "h-4 w-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"
9533
9623
  }
9534
- ), "Remember me"), /* @__PURE__ */ React19.createElement(
9624
+ ), "Remember me"), /* @__PURE__ */ React20.createElement(
9535
9625
  Link8,
9536
9626
  {
9537
9627
  href: "/forgot-password",
9538
9628
  className: "font-medium text-primary-600 transition hover:text-primary-700"
9539
9629
  },
9540
9630
  "Forgot password?"
9541
- )), /* @__PURE__ */ React19.createElement(
9631
+ )), /* @__PURE__ */ React20.createElement(
9542
9632
  Button,
9543
9633
  {
9544
9634
  type: "submit",
@@ -9547,7 +9637,7 @@ function LoginScreen() {
9547
9637
  className: "w-full"
9548
9638
  },
9549
9639
  "Sign in securely"
9550
- )), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-slate-50 p-6 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React19.createElement(Lock, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-800" }, "Secure by design"), /* @__PURE__ */ React19.createElement("p", null, "Encrypted sessions, multi-factor ready, and privacy-first policies keep your personal data safe.")))))
9640
+ )), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-slate-50 p-6 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React20.createElement(Lock, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-800" }, "Secure by design"), /* @__PURE__ */ React20.createElement("p", null, "Encrypted sessions, multi-factor ready, and privacy-first policies keep your personal data safe.")))))
9551
9641
  )));
9552
9642
  }
9553
9643
  var registerSchema = z.object({
@@ -9569,6 +9659,7 @@ var BENEFITS = [
9569
9659
  function RegisterScreen() {
9570
9660
  const router = useRouter();
9571
9661
  const { register: registerUser } = useAuth();
9662
+ const { buildPath } = useBasePath();
9572
9663
  const [showPassword, setShowPassword] = useState(false);
9573
9664
  const [showConfirmPassword, setShowConfirmPassword] = useState(false);
9574
9665
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -9590,14 +9681,14 @@ function RegisterScreen() {
9590
9681
  role: "User" /* User */
9591
9682
  });
9592
9683
  toast.success("Account created successfully!");
9593
- router.push("/");
9684
+ router.push(buildPath("/"));
9594
9685
  } catch (error) {
9595
9686
  toast.error(error.response?.data?.message || "Failed to create account");
9596
9687
  } finally {
9597
9688
  setIsSubmitting(false);
9598
9689
  }
9599
9690
  };
9600
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("div", { className: "grid min-h-screen overflow-hidden bg-white lg:grid-cols-[0.95fr_1.05fr]" }, /* @__PURE__ */ React19.createElement(
9691
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("div", { className: "grid min-h-screen overflow-hidden bg-white lg:grid-cols-[0.95fr_1.05fr]" }, /* @__PURE__ */ React20.createElement(
9601
9692
  motion.section,
9602
9693
  {
9603
9694
  initial: { opacity: 0, x: -24 },
@@ -9605,9 +9696,9 @@ function RegisterScreen() {
9605
9696
  transition: { duration: 0.4 },
9606
9697
  className: "flex flex-col justify-between bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] px-10 py-14 text-white"
9607
9698
  },
9608
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(HeartPulse, { className: "h-4 w-4" }), "Join Hey Pharmacist"), /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold leading-tight lg:text-5xl" }, "Create your wellness account"), /* @__PURE__ */ React19.createElement("p", { className: "max-w-xl text-white/80" }, "Unlock concierge-level pharmacy support, curated product recommendations, and smarter refills designed for busy families.")),
9609
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-4 rounded-3xl bg-white/10 p-6 backdrop-blur" }, BENEFITS.map((benefit) => /* @__PURE__ */ React19.createElement("div", { key: benefit, className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(CheckCircle2, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-white/85" }, benefit)))),
9610
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React19.createElement("span", null, "Already part of the community?"), /* @__PURE__ */ React19.createElement(
9699
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(HeartPulse, { className: "h-4 w-4" }), "Join Hey Pharmacist"), /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold leading-tight lg:text-5xl" }, "Create your wellness account"), /* @__PURE__ */ React20.createElement("p", { className: "max-w-xl text-white/80" }, "Unlock concierge-level pharmacy support, curated product recommendations, and smarter refills designed for busy families.")),
9700
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-4 rounded-3xl bg-white/10 p-6 backdrop-blur" }, BENEFITS.map((benefit) => /* @__PURE__ */ React20.createElement("div", { key: benefit, className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(CheckCircle2, { className: "h-5 w-5 text-white" }), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-white/85" }, benefit)))),
9701
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React20.createElement("span", null, "Already part of the community?"), /* @__PURE__ */ React20.createElement(
9611
9702
  Link8,
9612
9703
  {
9613
9704
  href: "/login",
@@ -9615,7 +9706,7 @@ function RegisterScreen() {
9615
9706
  },
9616
9707
  "Sign in"
9617
9708
  ))
9618
- ), /* @__PURE__ */ React19.createElement(
9709
+ ), /* @__PURE__ */ React20.createElement(
9619
9710
  motion.section,
9620
9711
  {
9621
9712
  initial: { opacity: 0, x: 24 },
@@ -9623,13 +9714,13 @@ function RegisterScreen() {
9623
9714
  transition: { duration: 0.4 },
9624
9715
  className: "flex items-center justify-center px-6 py-12 lg:px-16"
9625
9716
  },
9626
- /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-lg space-y-10" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-3xl font-bold text-slate-900" }, "Create an account"), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, "Start your personalized care journey with pharmacist-backed guidance.")), /* @__PURE__ */ React19.createElement(
9717
+ /* @__PURE__ */ React20.createElement("div", { className: "w-full max-w-lg space-y-10" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-3xl font-bold text-slate-900" }, "Create an account"), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, "Start your personalized care journey with pharmacist-backed guidance.")), /* @__PURE__ */ React20.createElement(
9627
9718
  "form",
9628
9719
  {
9629
9720
  onSubmit: handleSubmit(onSubmit),
9630
9721
  className: "space-y-6 rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-50"
9631
9722
  },
9632
- /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement(
9723
+ /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement(
9633
9724
  Input,
9634
9725
  {
9635
9726
  label: "First name",
@@ -9637,7 +9728,7 @@ function RegisterScreen() {
9637
9728
  ...register("firstName"),
9638
9729
  error: errors.firstName?.message
9639
9730
  }
9640
- ), /* @__PURE__ */ React19.createElement(
9731
+ ), /* @__PURE__ */ React20.createElement(
9641
9732
  Input,
9642
9733
  {
9643
9734
  label: "Last name",
@@ -9646,7 +9737,7 @@ function RegisterScreen() {
9646
9737
  error: errors.lastName?.message
9647
9738
  }
9648
9739
  )),
9649
- /* @__PURE__ */ React19.createElement(
9740
+ /* @__PURE__ */ React20.createElement(
9650
9741
  Input,
9651
9742
  {
9652
9743
  type: "email",
@@ -9656,7 +9747,7 @@ function RegisterScreen() {
9656
9747
  error: errors.email?.message
9657
9748
  }
9658
9749
  ),
9659
- /* @__PURE__ */ React19.createElement(
9750
+ /* @__PURE__ */ React20.createElement(
9660
9751
  Input,
9661
9752
  {
9662
9753
  type: "tel",
@@ -9666,7 +9757,7 @@ function RegisterScreen() {
9666
9757
  error: errors.phone?.message
9667
9758
  }
9668
9759
  ),
9669
- /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
9760
+ /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
9670
9761
  Input,
9671
9762
  {
9672
9763
  type: showPassword ? "text" : "password",
@@ -9675,16 +9766,16 @@ function RegisterScreen() {
9675
9766
  ...register("password"),
9676
9767
  error: errors.password?.message
9677
9768
  }
9678
- ), /* @__PURE__ */ React19.createElement(
9769
+ ), /* @__PURE__ */ React20.createElement(
9679
9770
  "button",
9680
9771
  {
9681
9772
  type: "button",
9682
9773
  onClick: () => setShowPassword((prev) => !prev),
9683
9774
  className: "absolute right-3 top-[42px] text-slate-400 transition hover:text-slate-600"
9684
9775
  },
9685
- showPassword ? /* @__PURE__ */ React19.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React19.createElement(Eye, { className: "h-5 w-5" })
9776
+ showPassword ? /* @__PURE__ */ React20.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React20.createElement(Eye, { className: "h-5 w-5" })
9686
9777
  )),
9687
- /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
9778
+ /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
9688
9779
  Input,
9689
9780
  {
9690
9781
  type: showConfirmPassword ? "text" : "password",
@@ -9693,16 +9784,16 @@ function RegisterScreen() {
9693
9784
  ...register("confirmPassword"),
9694
9785
  error: errors.confirmPassword?.message
9695
9786
  }
9696
- ), /* @__PURE__ */ React19.createElement(
9787
+ ), /* @__PURE__ */ React20.createElement(
9697
9788
  "button",
9698
9789
  {
9699
9790
  type: "button",
9700
9791
  onClick: () => setShowConfirmPassword((prev) => !prev),
9701
9792
  className: "absolute right-3 top-[42px] text-slate-400 transition hover:text-slate-600"
9702
9793
  },
9703
- showConfirmPassword ? /* @__PURE__ */ React19.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React19.createElement(Eye, { className: "h-5 w-5" })
9794
+ showConfirmPassword ? /* @__PURE__ */ React20.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React20.createElement(Eye, { className: "h-5 w-5" })
9704
9795
  )),
9705
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement(Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React19.createElement(Link8, { href: "/terms", className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React19.createElement(
9796
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement(Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React20.createElement(Link8, { href: "/terms", className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React20.createElement(
9706
9797
  Link8,
9707
9798
  {
9708
9799
  href: "/privacy",
@@ -9710,7 +9801,7 @@ function RegisterScreen() {
9710
9801
  },
9711
9802
  "Privacy Policy"
9712
9803
  ), ". We protect your information with bank-level encryption.")),
9713
- /* @__PURE__ */ React19.createElement(
9804
+ /* @__PURE__ */ React20.createElement(
9714
9805
  Button,
9715
9806
  {
9716
9807
  type: "submit",
@@ -9718,10 +9809,10 @@ function RegisterScreen() {
9718
9809
  isLoading: isSubmitting,
9719
9810
  className: "w-full"
9720
9811
  },
9721
- /* @__PURE__ */ React19.createElement(UserPlus, { className: "h-5 w-5" }),
9812
+ /* @__PURE__ */ React20.createElement(UserPlus, { className: "h-5 w-5" }),
9722
9813
  "Create my account"
9723
9814
  )
9724
- ), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-slate-50 p-6 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React19.createElement(Heart, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-800" }, "Members love us"), /* @__PURE__ */ React19.createElement("p", null, "92% of patients report improved adherence after receiving pharmacist touchpoints through their Hey Pharmacist account.")))))
9815
+ ), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-slate-50 p-6 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React20.createElement(Heart, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-800" }, "Members love us"), /* @__PURE__ */ React20.createElement("p", null, "92% of patients report improved adherence after receiving pharmacist touchpoints through their Hey Pharmacist account.")))))
9725
9816
  )));
9726
9817
  }
9727
9818
  var profileSchema = z.object({
@@ -9733,6 +9824,7 @@ var profileSchema = z.object({
9733
9824
  function ProfileScreen() {
9734
9825
  const router = useRouter();
9735
9826
  const { user, updateUser, logout } = useAuth();
9827
+ const { buildPath } = useBasePath();
9736
9828
  const [isSubmitting, setIsSubmitting] = useState(false);
9737
9829
  const {
9738
9830
  register,
@@ -9761,10 +9853,10 @@ function ProfileScreen() {
9761
9853
  const handleLogout = async () => {
9762
9854
  await logout();
9763
9855
  toast.success("Logged out successfully");
9764
- router.push("/");
9856
+ router.push(buildPath("/"));
9765
9857
  };
9766
9858
  if (!user) {
9767
- router.push("/login");
9859
+ router.push(buildPath("/login"));
9768
9860
  return null;
9769
9861
  }
9770
9862
  const quickLinks = [
@@ -9772,46 +9864,46 @@ function ProfileScreen() {
9772
9864
  icon: Package,
9773
9865
  label: "Order history",
9774
9866
  description: "Track shipments and download invoices",
9775
- href: "/orders"
9867
+ href: buildPath("/orders")
9776
9868
  },
9777
9869
  {
9778
9870
  icon: Heart,
9779
9871
  label: "Wishlist",
9780
9872
  description: "Curate go-to remedies and favorites",
9781
- href: "/wishlist"
9873
+ href: buildPath("/wishlist")
9782
9874
  },
9783
9875
  {
9784
9876
  icon: MapPin,
9785
9877
  label: "Delivery addresses",
9786
9878
  description: "Manage saved delivery locations",
9787
- href: "/account/addresses"
9879
+ href: buildPath("/account/addresses")
9788
9880
  }
9789
9881
  ];
9790
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement(
9882
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement(
9791
9883
  motion.div,
9792
9884
  {
9793
9885
  initial: { opacity: 0, y: 24 },
9794
9886
  animate: { opacity: 1, y: 0 },
9795
9887
  className: "flex flex-col gap-8 md:flex-row md:items-center md:justify-between"
9796
9888
  },
9797
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-5" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(HeartPulse, { className: "h-4 w-4" }), "My account"), /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Hello, ", user.firstname, " ", user.lastname), /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Manage profile details, shipping preferences, and personalized recommendations. Our pharmacists keep your care plan up to date."), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-4 text-sm text-white/80" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2" }, /* @__PURE__ */ React19.createElement(ShieldCheck, { className: "h-4 w-4" }), "Account secured with multi-factor ready login"))),
9798
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center gap-4 rounded-3xl bg-white/15 p-6 text-center backdrop-blur" }, /* @__PURE__ */ React19.createElement("div", { className: "flex h-24 w-24 items-center justify-center rounded-full bg-white/20 text-3xl font-bold text-white" }, getInitials(user?.firstname || "", user?.lastname || "") || ""), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-white/80" }, user.email), /* @__PURE__ */ React19.createElement(
9889
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-5" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(HeartPulse, { className: "h-4 w-4" }), "My account"), /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Hello, ", user.firstname, " ", user.lastname), /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Manage profile details, shipping preferences, and personalized recommendations. Our pharmacists keep your care plan up to date."), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-4 text-sm text-white/80" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2" }, /* @__PURE__ */ React20.createElement(ShieldCheck, { className: "h-4 w-4" }), "Account secured with multi-factor ready login"))),
9890
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col items-center gap-4 rounded-3xl bg-white/15 p-6 text-center backdrop-blur" }, /* @__PURE__ */ React20.createElement("div", { className: "flex h-24 w-24 items-center justify-center rounded-full bg-white/20 text-3xl font-bold text-white" }, getInitials(user?.firstname || "", user?.lastname || "") || ""), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-white/80" }, user.email), /* @__PURE__ */ React20.createElement(
9799
9891
  Button,
9800
9892
  {
9801
9893
  variant: "ghost",
9802
9894
  className: "text-white hover:bg-white/20",
9803
- onClick: () => router.push("/account/change-password")
9895
+ onClick: () => router.push(buildPath("/account/change-password"))
9804
9896
  },
9805
9897
  "Change password"
9806
9898
  ))
9807
- ))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]" }, /* @__PURE__ */ React19.createElement(
9899
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]" }, /* @__PURE__ */ React20.createElement(
9808
9900
  motion.div,
9809
9901
  {
9810
9902
  initial: { opacity: 0, y: 24 },
9811
9903
  animate: { opacity: 1, y: 0 },
9812
9904
  className: "space-y-6"
9813
9905
  },
9814
- /* @__PURE__ */ React19.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Personal information"), /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-5 w-5 text-primary-500" })), /* @__PURE__ */ React19.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "mt-6 space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement(
9906
+ /* @__PURE__ */ React20.createElement("section", { className: "rounded-3xl border border-slate-100 bg-white p-8 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-xl font-semibold text-slate-900" }, "Personal information"), /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-5 w-5 text-primary-500" })), /* @__PURE__ */ React20.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "mt-6 space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement(
9815
9907
  Input,
9816
9908
  {
9817
9909
  label: "First name",
@@ -9819,7 +9911,7 @@ function ProfileScreen() {
9819
9911
  ...register("firstName"),
9820
9912
  error: errors.firstName?.message
9821
9913
  }
9822
- ), /* @__PURE__ */ React19.createElement(
9914
+ ), /* @__PURE__ */ React20.createElement(
9823
9915
  Input,
9824
9916
  {
9825
9917
  label: "Last name",
@@ -9827,7 +9919,7 @@ function ProfileScreen() {
9827
9919
  ...register("lastName"),
9828
9920
  error: errors.lastName?.message
9829
9921
  }
9830
- )), /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
9922
+ )), /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
9831
9923
  Input,
9832
9924
  {
9833
9925
  type: "email",
@@ -9837,7 +9929,7 @@ function ProfileScreen() {
9837
9929
  ...register("email"),
9838
9930
  error: errors.email?.message
9839
9931
  }
9840
- ), /* @__PURE__ */ React19.createElement(Mail, { className: "absolute left-3 top-[38px] h-4 w-4 text-slate-400" })), /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
9932
+ ), /* @__PURE__ */ React20.createElement(Mail, { className: "absolute left-3 top-[38px] h-4 w-4 text-slate-400" })), /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
9841
9933
  Input,
9842
9934
  {
9843
9935
  type: "tel",
@@ -9847,7 +9939,7 @@ function ProfileScreen() {
9847
9939
  ...register("phone"),
9848
9940
  error: errors.phone?.message
9849
9941
  }
9850
- ), /* @__PURE__ */ React19.createElement(Phone, { className: "absolute left-3 top-[38px] h-4 w-4 text-slate-400" })), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-4" }, /* @__PURE__ */ React19.createElement(
9942
+ ), /* @__PURE__ */ React20.createElement(Phone, { className: "absolute left-3 top-[38px] h-4 w-4 text-slate-400" })), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-4" }, /* @__PURE__ */ React20.createElement(
9851
9943
  Button,
9852
9944
  {
9853
9945
  type: "submit",
@@ -9855,26 +9947,26 @@ function ProfileScreen() {
9855
9947
  isLoading: isSubmitting
9856
9948
  },
9857
9949
  "Save changes"
9858
- ), /* @__PURE__ */ React19.createElement(
9950
+ ), /* @__PURE__ */ React20.createElement(
9859
9951
  Button,
9860
9952
  {
9861
9953
  type: "button",
9862
9954
  variant: "outline",
9863
9955
  size: "lg",
9864
- onClick: () => router.push("/orders")
9956
+ onClick: () => router.push(buildPath("/orders"))
9865
9957
  },
9866
9958
  "View recent orders"
9867
9959
  )))),
9868
- /* @__PURE__ */ React19.createElement("section", { className: "grid gap-4 md:grid-cols-2" }, quickLinks.map((item) => /* @__PURE__ */ React19.createElement(
9960
+ /* @__PURE__ */ React20.createElement("section", { className: "grid gap-4 md:grid-cols-2" }, quickLinks.map((item) => /* @__PURE__ */ React20.createElement(
9869
9961
  Link8,
9870
9962
  {
9871
9963
  key: item.href,
9872
9964
  href: item.href,
9873
9965
  className: "group rounded-3xl border border-slate-100 bg-white p-6 shadow-sm transition hover:-translate-y-1 hover:shadow-lg"
9874
9966
  },
9875
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement("span", { className: "rounded-2xl bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React19.createElement(item.icon, { className: "h-5 w-5" })), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "text-base font-semibold text-slate-900 group-hover:text-primary-600" }, item.label), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, item.description)))
9967
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement("span", { className: "rounded-2xl bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React20.createElement(item.icon, { className: "h-5 w-5" })), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "text-base font-semibold text-slate-900 group-hover:text-primary-600" }, item.label), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, item.description)))
9876
9968
  )))
9877
- ), /* @__PURE__ */ React19.createElement(
9969
+ ), /* @__PURE__ */ React20.createElement(
9878
9970
  motion.aside,
9879
9971
  {
9880
9972
  initial: { opacity: 0, y: 24 },
@@ -9882,30 +9974,31 @@ function ProfileScreen() {
9882
9974
  transition: { delay: 0.1 },
9883
9975
  className: "space-y-6"
9884
9976
  },
9885
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, "Care preferences"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-sm text-slate-600" }, "Customize how we support you. Set refill reminders or manage communication preferences to stay aligned with your wellness goals."), /* @__PURE__ */ React19.createElement(
9977
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, "Care preferences"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-sm text-slate-600" }, "Customize how we support you. Set refill reminders or manage communication preferences to stay aligned with your wellness goals."), /* @__PURE__ */ React20.createElement(
9886
9978
  Button,
9887
9979
  {
9888
9980
  variant: "outline",
9889
9981
  className: "mt-4 w-full",
9890
- onClick: () => router.push("/account/preferences")
9982
+ onClick: () => router.push(buildPath("/account/preferences"))
9891
9983
  },
9892
9984
  "Manage preferences"
9893
9985
  )),
9894
- /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Pharmacist tip"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 leading-relaxed" }, "Keep your phone number current so pharmacists can reach you quickly with dosage advice or time-sensitive updates about your order.")),
9895
- /* @__PURE__ */ React19.createElement(
9986
+ /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Pharmacist tip"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 leading-relaxed" }, "Keep your phone number current so pharmacists can reach you quickly with dosage advice or time-sensitive updates about your order.")),
9987
+ /* @__PURE__ */ React20.createElement(
9896
9988
  "button",
9897
9989
  {
9898
9990
  onClick: handleLogout,
9899
9991
  className: "flex w-full items-center justify-center gap-2 rounded-3xl border border-red-200 bg-red-50 px-4 py-3 text-sm font-semibold text-red-600 transition hover:bg-red-100"
9900
9992
  },
9901
- /* @__PURE__ */ React19.createElement(LogOut, { className: "h-4 w-4" }),
9993
+ /* @__PURE__ */ React20.createElement(LogOut, { className: "h-4 w-4" }),
9902
9994
  "Log out"
9903
9995
  )
9904
9996
  )))));
9905
9997
  }
9906
9998
  function OrderCard({ order }) {
9999
+ const { buildPath } = useBasePath();
9907
10000
  const config = order.orderStatus;
9908
- return /* @__PURE__ */ React19.createElement(
10001
+ return /* @__PURE__ */ React20.createElement(
9909
10002
  motion.div,
9910
10003
  {
9911
10004
  initial: { opacity: 0, y: 20 },
@@ -9913,9 +10006,9 @@ function OrderCard({ order }) {
9913
10006
  whileHover: { y: -4 },
9914
10007
  className: "bg-white rounded-2xl p-6 shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100"
9915
10008
  },
9916
- /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-start mb-4" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-bold text-gray-900 flex items-center gap-2" }, /* @__PURE__ */ React19.createElement(Package, { className: "w-5 h-5 text-primary-600" }), "Order #", order?._id?.slice(0, 6) || ""), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-gray-500 mt-1 flex items-center gap-2" }, /* @__PURE__ */ React19.createElement(Calendar, { className: "w-4 h-4" }), formatDate(order.createdAt || /* @__PURE__ */ new Date(), "long"))), /* @__PURE__ */ React19.createElement(Badge, { variant: config }, config)),
9917
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-2 mb-4" }, order.items?.slice(0, 2).map((item) => /* @__PURE__ */ React19.createElement("div", { key: item.productVariantId, className: "flex items-center gap-3 text-sm" }, /* @__PURE__ */ React19.createElement(Image3, { src: item?.productVariantData?.productMedia?.[0]?.file || "/placeholder-product.jpg", alt: item?.productVariantData?.name || "Product image", width: 48, height: 48, className: "w-12 h-12 rounded-lg bg-gray-100 flex-shrink-0" }), /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("p", { className: "font-medium text-gray-900 truncate" }, item.productVariantData.name), /* @__PURE__ */ React19.createElement("p", { className: "text-gray-500" }, "Qty: ", item.quantity)), /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-gray-900" }, formatPrice(item.productVariantData.finalPrice)))), order.items?.length && order.items?.length > 2 && /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-gray-500 pl-15" }, "+", order.items.length - 2, " more item", order.items.length - 2 > 1 ? "s" : "")),
9918
- /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-center pt-4 border-t border-gray-200" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-gray-500" }, "Total Amount"), /* @__PURE__ */ React19.createElement("p", { className: "text-2xl font-bold text-gray-900" }, formatPrice(order.grandTotal || 0))), /* @__PURE__ */ React19.createElement("div", { className: "flex gap-2" }, order.payment.paymentStatus !== "Paid" /* Paid */ && order.payment.paymentMethod === "Card" /* Card */ && /* @__PURE__ */ React19.createElement(
10009
+ /* @__PURE__ */ React20.createElement("div", { className: "flex justify-between items-start mb-4" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-bold text-gray-900 flex items-center gap-2" }, /* @__PURE__ */ React20.createElement(Package, { className: "w-5 h-5 text-primary-600" }), "Order #", order?._id?.slice(0, 6) || ""), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-gray-500 mt-1 flex items-center gap-2" }, /* @__PURE__ */ React20.createElement(Calendar, { className: "w-4 h-4" }), formatDate(order.createdAt || /* @__PURE__ */ new Date(), "long"))), /* @__PURE__ */ React20.createElement(Badge, { variant: config }, config)),
10010
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-2 mb-4" }, order.items?.slice(0, 2).map((item) => /* @__PURE__ */ React20.createElement("div", { key: item.productVariantId, className: "flex items-center gap-3 text-sm" }, /* @__PURE__ */ React20.createElement(Image3, { src: item?.productVariantData?.productMedia?.[0]?.file || "/placeholder-product.jpg", alt: item?.productVariantData?.name || "Product image", width: 48, height: 48, className: "w-12 h-12 rounded-lg bg-gray-100 flex-shrink-0" }), /* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React20.createElement("p", { className: "font-medium text-gray-900 truncate" }, item.productVariantData.name), /* @__PURE__ */ React20.createElement("p", { className: "text-gray-500" }, "Qty: ", item.quantity)), /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-gray-900" }, formatPrice(item.productVariantData.finalPrice)))), order.items?.length && order.items?.length > 2 && /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-gray-500 pl-15" }, "+", order.items.length - 2, " more item", order.items.length - 2 > 1 ? "s" : "")),
10011
+ /* @__PURE__ */ React20.createElement("div", { className: "flex justify-between items-center pt-4 border-t border-gray-200" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-gray-500" }, "Total Amount"), /* @__PURE__ */ React20.createElement("p", { className: "text-2xl font-bold text-gray-900" }, formatPrice(order.grandTotal || 0))), /* @__PURE__ */ React20.createElement("div", { className: "flex gap-2" }, order.payment.paymentStatus !== "Paid" /* Paid */ && order.payment.paymentMethod === "Card" /* Card */ && /* @__PURE__ */ React20.createElement(
9919
10012
  "a",
9920
10013
  {
9921
10014
  href: order?.payment?.paymentIntent?.hostedInvoiceUrl || "",
@@ -9923,7 +10016,7 @@ function OrderCard({ order }) {
9923
10016
  rel: "noopener noreferrer",
9924
10017
  className: "inline-flex items-center gap-2 px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors"
9925
10018
  },
9926
- /* @__PURE__ */ React19.createElement(CreditCard, { className: "w-4 h-4" }),
10019
+ /* @__PURE__ */ React20.createElement(CreditCard, { className: "w-4 h-4" }),
9927
10020
  "Pay Now"
9928
10021
  )))
9929
10022
  );
@@ -10079,7 +10172,7 @@ function FilterChips({
10079
10172
  document.removeEventListener("mousedown", handleClickOutside);
10080
10173
  };
10081
10174
  }, [isOverflowOpen]);
10082
- return /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3 md:flex-row md:items-center md:gap-4" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-600" }, /* @__PURE__ */ React19.createElement(Icon, { className: "h-4 w-4" }), label), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-2 md:flex-row md:items-center md:gap-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2" }, visibleFilters.map((filter) => /* @__PURE__ */ React19.createElement(
10175
+ return /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3 md:flex-row md:items-center md:gap-4" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-600" }, /* @__PURE__ */ React20.createElement(Icon, { className: "h-4 w-4" }), label), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-2 md:flex-row md:items-center md:gap-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2" }, visibleFilters.map((filter) => /* @__PURE__ */ React20.createElement(
10083
10176
  "button",
10084
10177
  {
10085
10178
  key: filter,
@@ -10088,16 +10181,16 @@ function FilterChips({
10088
10181
  className: `rounded-full border px-3 py-1 text-sm font-medium transition ${selected === filter ? `border-${color}-600 bg-${color}-600 text-white shadow-lg shadow-${color}-500/30` : `border-slate-200 bg-slate-50 text-slate-600 hover:border-${color}-300 hover:text-${color}-600`}`
10089
10182
  },
10090
10183
  filter
10091
- ))), overflowFilters.length > 0 && /* @__PURE__ */ React19.createElement("div", { className: "relative", ref: overflowMenuRef }, /* @__PURE__ */ React19.createElement(
10184
+ ))), overflowFilters.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "relative", ref: overflowMenuRef }, /* @__PURE__ */ React20.createElement(
10092
10185
  "button",
10093
10186
  {
10094
10187
  type: "button",
10095
10188
  onClick: () => setIsOverflowOpen((prev) => !prev),
10096
10189
  className: `flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium transition ${overflowFilters.includes(selected) ? `border-${color}-600 bg-${color}-50 text-${color}-700 shadow-lg shadow-${color}-500/20` : "border-slate-200 bg-white text-slate-600 hover:border-slate-300"}`
10097
10190
  },
10098
- /* @__PURE__ */ React19.createElement("span", null, overflowFilters.includes(selected) ? selected : "More"),
10099
- /* @__PURE__ */ React19.createElement("span", { className: `inline-flex h-5 min-w-[1.5rem] items-center justify-center rounded-full bg-${color}-100 px-1 text-xs font-semibold text-${color}-600` }, overflowFilters.length)
10100
- ), /* @__PURE__ */ React19.createElement(AnimatePresence, null, isOverflowOpen && /* @__PURE__ */ React19.createElement(
10191
+ /* @__PURE__ */ React20.createElement("span", null, overflowFilters.includes(selected) ? selected : "More"),
10192
+ /* @__PURE__ */ React20.createElement("span", { className: `inline-flex h-5 min-w-[1.5rem] items-center justify-center rounded-full bg-${color}-100 px-1 text-xs font-semibold text-${color}-600` }, overflowFilters.length)
10193
+ ), /* @__PURE__ */ React20.createElement(AnimatePresence, null, isOverflowOpen && /* @__PURE__ */ React20.createElement(
10101
10194
  motion.div,
10102
10195
  {
10103
10196
  initial: { opacity: 0, y: 8 },
@@ -10106,7 +10199,7 @@ function FilterChips({
10106
10199
  transition: { duration: 0.15 },
10107
10200
  className: "absolute right-0 z-50 mt-2 w-64 rounded-2xl border border-slate-100 bg-white shadow-xl shadow-primary-50"
10108
10201
  },
10109
- /* @__PURE__ */ React19.createElement("div", { className: "border-b border-slate-100 px-4 py-3" }, /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }), /* @__PURE__ */ React19.createElement(
10202
+ /* @__PURE__ */ React20.createElement("div", { className: "border-b border-slate-100 px-4 py-3" }, /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }), /* @__PURE__ */ React20.createElement(
10110
10203
  "input",
10111
10204
  {
10112
10205
  type: "text",
@@ -10116,7 +10209,7 @@ function FilterChips({
10116
10209
  className: "w-full rounded-full border border-slate-200 bg-slate-50 py-2 pl-9 pr-3 text-sm text-slate-600 outline-none transition focus:border-primary-300 focus:bg-white focus:ring-2 focus:ring-primary-200"
10117
10210
  }
10118
10211
  ))),
10119
- /* @__PURE__ */ React19.createElement("div", { className: "max-h-60 overflow-y-auto px-2 py-2" }, filteredOverflowFilters.length > 0 ? filteredOverflowFilters.map((filter) => /* @__PURE__ */ React19.createElement(
10212
+ /* @__PURE__ */ React20.createElement("div", { className: "max-h-60 overflow-y-auto px-2 py-2" }, filteredOverflowFilters.length > 0 ? filteredOverflowFilters.map((filter) => /* @__PURE__ */ React20.createElement(
10120
10213
  "button",
10121
10214
  {
10122
10215
  key: filter,
@@ -10127,10 +10220,10 @@ function FilterChips({
10127
10220
  },
10128
10221
  className: `flex w-full items-center justify-between rounded-xl px-3 py-2 text-sm font-medium transition ${selected === filter ? `bg-${color}-600 text-white shadow-lg shadow-${color}-500/30` : "text-slate-600 hover:bg-slate-100"}`
10129
10222
  },
10130
- /* @__PURE__ */ React19.createElement("span", null, filter),
10131
- selected === filter && /* @__PURE__ */ React19.createElement(Check, { className: "h-4 w-4" })
10132
- )) : /* @__PURE__ */ React19.createElement("p", { className: "px-3 py-4 text-sm text-slate-500" }, "No items found.")),
10133
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between gap-2 border-t border-slate-100 px-4 py-3" }, /* @__PURE__ */ React19.createElement("span", { className: "text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Quick actions"), /* @__PURE__ */ React19.createElement(
10223
+ /* @__PURE__ */ React20.createElement("span", null, filter),
10224
+ selected === filter && /* @__PURE__ */ React20.createElement(Check, { className: "h-4 w-4" })
10225
+ )) : /* @__PURE__ */ React20.createElement("p", { className: "px-3 py-4 text-sm text-slate-500" }, "No items found.")),
10226
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between gap-2 border-t border-slate-100 px-4 py-3" }, /* @__PURE__ */ React20.createElement("span", { className: "text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Quick actions"), /* @__PURE__ */ React20.createElement(
10134
10227
  "button",
10135
10228
  {
10136
10229
  type: "button",
@@ -10148,6 +10241,7 @@ var STATUS_FILTERS = ["All", ...Object.values(ManualOrderDTOOrderStatusEnum)];
10148
10241
  var PAYMENT_FILTERS = ["All", ...Object.values(PaymentPaymentStatusEnum)];
10149
10242
  function OrdersScreen() {
10150
10243
  const router = useRouter();
10244
+ const { buildPath } = useBasePath();
10151
10245
  const [page, setPage] = useState(1);
10152
10246
  const [selectedFilter, setSelectedFilter] = useState("All");
10153
10247
  const [selectedPaymentFilter, setSelectedPaymentFilter] = useState("All");
@@ -10187,23 +10281,23 @@ function OrdersScreen() {
10187
10281
  document.removeEventListener("mousedown", handleClickOutside);
10188
10282
  };
10189
10283
  }, [isOverflowOpen]);
10190
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement(
10284
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement(
10191
10285
  motion.div,
10192
10286
  {
10193
10287
  initial: { opacity: 0, y: 24 },
10194
10288
  animate: { opacity: 1, y: 0 },
10195
10289
  className: "space-y-6"
10196
10290
  },
10197
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(CalendarDays, { className: "h-4 w-4" }), "Order history"),
10198
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "All of your pharmacy orders"), /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Access receipts, shipping statuses, and reorder suggestions in one organized timeline curated by our pharmacists.")), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick tip"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Use filters to review previous prescriptions, reorder favorites, or download invoices for insurance claims.")))
10199
- ))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-16 container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement(
10291
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(CalendarDays, { className: "h-4 w-4" }), "Order history"),
10292
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "All of your pharmacy orders"), /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Access receipts, shipping statuses, and reorder suggestions in one organized timeline curated by our pharmacists.")), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick tip"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Use filters to review previous prescriptions, reorder favorites, or download invoices for insurance claims.")))
10293
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-16 container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement(
10200
10294
  motion.div,
10201
10295
  {
10202
10296
  initial: { opacity: 0, y: 24 },
10203
10297
  animate: { opacity: 1, y: 0 },
10204
10298
  className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50"
10205
10299
  },
10206
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3 text-sm text-slate-500" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "Explore your complete order archive with pharmacist notes.")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4 md:items-end" }, /* @__PURE__ */ React19.createElement(
10300
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3 text-sm text-slate-500" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "Explore your complete order archive with pharmacist notes.")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4 md:items-end" }, /* @__PURE__ */ React20.createElement(
10207
10301
  FilterChips,
10208
10302
  {
10209
10303
  label: "Status filters",
@@ -10217,7 +10311,7 @@ function OrdersScreen() {
10217
10311
  maxVisible: MAX_VISIBLE_FILTERS,
10218
10312
  variant: "primary"
10219
10313
  }
10220
- ), /* @__PURE__ */ React19.createElement(
10314
+ ), /* @__PURE__ */ React20.createElement(
10221
10315
  FilterChips,
10222
10316
  {
10223
10317
  label: "Payment status",
@@ -10232,26 +10326,26 @@ function OrdersScreen() {
10232
10326
  variant: "primary"
10233
10327
  }
10234
10328
  ))),
10235
- /* @__PURE__ */ React19.createElement("div", { className: "mt-6 space-y-4" }, isLoading ? Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React19.createElement(OrderCardSkeleton, { key: index })) : hasOrders ? filteredOrders.map((order) => /* @__PURE__ */ React19.createElement(OrderCard, { key: order.id, order })) : /* @__PURE__ */ React19.createElement(
10329
+ /* @__PURE__ */ React20.createElement("div", { className: "mt-6 space-y-4" }, isLoading ? Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React20.createElement(OrderCardSkeleton, { key: index })) : hasOrders ? filteredOrders.map((order) => /* @__PURE__ */ React20.createElement(OrderCard, { key: order.id, order })) : /* @__PURE__ */ React20.createElement(
10236
10330
  EmptyState,
10237
10331
  {
10238
10332
  icon: Package,
10239
10333
  title: "No orders found for these filters",
10240
10334
  description: "Adjust the status or payment filters, or browse the shop for new essentials.",
10241
10335
  actionLabel: "Shop products",
10242
- onAction: () => router.push("/shop")
10336
+ onAction: () => router.push(buildPath("/shop"))
10243
10337
  }
10244
10338
  )),
10245
- !isLoading && pagination.totalPages > 1 && hasOrders && /* @__PURE__ */ React19.createElement("div", { className: "mt-10 flex flex-wrap items-center justify-center gap-4" }, /* @__PURE__ */ React19.createElement(
10339
+ !isLoading && pagination.totalPages > 1 && hasOrders && /* @__PURE__ */ React20.createElement("div", { className: "mt-10 flex flex-wrap items-center justify-center gap-4" }, /* @__PURE__ */ React20.createElement(
10246
10340
  Button,
10247
10341
  {
10248
10342
  variant: "outline",
10249
10343
  onClick: () => setPage((current) => Math.max(1, current - 1)),
10250
10344
  disabled: page === 1
10251
10345
  },
10252
- /* @__PURE__ */ React19.createElement(ChevronLeft, { className: "h-5 w-5" }),
10346
+ /* @__PURE__ */ React20.createElement(ChevronLeft, { className: "h-5 w-5" }),
10253
10347
  "Previous"
10254
- ), /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-semibold text-slate-600" }, "Page ", page, " of ", pagination.totalPages), /* @__PURE__ */ React19.createElement(
10348
+ ), /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-semibold text-slate-600" }, "Page ", page, " of ", pagination.totalPages), /* @__PURE__ */ React20.createElement(
10255
10349
  Button,
10256
10350
  {
10257
10351
  variant: "outline",
@@ -10259,25 +10353,26 @@ function OrdersScreen() {
10259
10353
  disabled: page === pagination.totalPages
10260
10354
  },
10261
10355
  "Next",
10262
- /* @__PURE__ */ React19.createElement(ChevronRight, { className: "h-5 w-5" })
10356
+ /* @__PURE__ */ React20.createElement(ChevronRight, { className: "h-5 w-5" })
10263
10357
  ))
10264
10358
  ))));
10265
10359
  }
10266
10360
  function CurrentOrdersScreen() {
10267
10361
  const router = useRouter();
10268
10362
  const { orders, isLoading } = useCurrentOrders();
10363
+ const { buildPath } = useBasePath();
10269
10364
  const hasOrders = orders.length > 0;
10270
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement(
10365
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement(
10271
10366
  motion.div,
10272
10367
  {
10273
10368
  initial: { opacity: 0, y: 24 },
10274
10369
  animate: { opacity: 1, y: 0 },
10275
10370
  className: "space-y-4"
10276
10371
  },
10277
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(Truck, { className: "h-4 w-4" }), "Live order tracking"),
10278
- /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Current orders"),
10279
- /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Follow your pharmacy orders from preparation to delivery. Real-time updates, SMS alerts, and pharmacist oversight come standard.")
10280
- ), /* @__PURE__ */ React19.createElement(
10372
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(Truck, { className: "h-4 w-4" }), "Live order tracking"),
10373
+ /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Current orders"),
10374
+ /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Follow your pharmacy orders from preparation to delivery. Real-time updates, SMS alerts, and pharmacist oversight come standard.")
10375
+ ), /* @__PURE__ */ React20.createElement(
10281
10376
  motion.div,
10282
10377
  {
10283
10378
  initial: { opacity: 0, y: 24 },
@@ -10285,34 +10380,34 @@ function CurrentOrdersScreen() {
10285
10380
  transition: { delay: 0.1 },
10286
10381
  className: "rounded-3xl bg-white/15 p-6 backdrop-blur"
10287
10382
  },
10288
- /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick actions"),
10289
- /* @__PURE__ */ React19.createElement("div", { className: "mt-4 space-y-3 text-sm text-white/80" }, /* @__PURE__ */ React19.createElement(
10383
+ /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick actions"),
10384
+ /* @__PURE__ */ React20.createElement("div", { className: "mt-4 space-y-3 text-sm text-white/80" }, /* @__PURE__ */ React20.createElement(
10290
10385
  Link8,
10291
10386
  {
10292
- href: "/orders",
10387
+ href: buildPath("/orders"),
10293
10388
  className: "flex items-center justify-between rounded-2xl bg-white/10 px-4 py-3 transition hover:bg-white/20"
10294
10389
  },
10295
- /* @__PURE__ */ React19.createElement("span", { className: "font-semibold text-white" }, "View order history"),
10296
- /* @__PURE__ */ React19.createElement(ArrowUpRight, { className: "h-4 w-4" })
10297
- ), /* @__PURE__ */ React19.createElement("p", null, "Need help fast? Chat with a pharmacist and we will triage your request in under 10 minutes."))
10298
- )))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-16" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement(
10390
+ /* @__PURE__ */ React20.createElement("span", { className: "font-semibold text-white" }, "View order history"),
10391
+ /* @__PURE__ */ React20.createElement(ArrowUpRight, { className: "h-4 w-4" })
10392
+ ), /* @__PURE__ */ React20.createElement("p", null, "Need help fast? Chat with a pharmacist and we will triage your request in under 10 minutes."))
10393
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-16" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement(
10299
10394
  motion.section,
10300
10395
  {
10301
10396
  initial: { opacity: 0, y: 24 },
10302
10397
  animate: { opacity: 1, y: 0 },
10303
10398
  className: "grid gap-6 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]"
10304
10399
  },
10305
- /* @__PURE__ */ React19.createElement("div", { className: "space-y-6" }, isLoading ? /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React19.createElement(OrderCardSkeleton, { key: index }))) : hasOrders ? /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, orders.map((order) => /* @__PURE__ */ React19.createElement(OrderCard, { key: order.id, order }))) : /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-10 shadow-sm" }, /* @__PURE__ */ React19.createElement(
10400
+ /* @__PURE__ */ React20.createElement("div", { className: "space-y-6" }, isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React20.createElement(OrderCardSkeleton, { key: index }))) : hasOrders ? /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, orders.map((order) => /* @__PURE__ */ React20.createElement(OrderCard, { key: order.id, order }))) : /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-10 shadow-sm" }, /* @__PURE__ */ React20.createElement(
10306
10401
  EmptyState,
10307
10402
  {
10308
10403
  icon: PackageCheck,
10309
10404
  title: "No active orders",
10310
10405
  description: "Start a new order to see live preparation, packing, and delivery updates here.",
10311
10406
  actionLabel: "Shop wellness essentials",
10312
- onAction: () => router.push("/shop")
10407
+ onAction: () => router.push(buildPath("/shop"))
10313
10408
  }
10314
10409
  ))),
10315
- /* @__PURE__ */ React19.createElement("aside", { className: "space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-lg font-semibold text-slate-900" }, "Real-time milestones"), /* @__PURE__ */ React19.createElement("div", { className: "mt-4 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React19.createElement(Warehouse, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-800" }, "Preparation"), /* @__PURE__ */ React19.createElement("p", null, "Our pharmacists verify ingredients and pack thermo-sensitive items."))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React19.createElement(Truck, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-800" }, "In transit"), /* @__PURE__ */ React19.createElement("p", null, "Track live courier location with ETA updates tailored to your delivery window."))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React19.createElement(BellRing, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold text-slate-800" }, "Arrival alerts"), /* @__PURE__ */ React19.createElement("p", null, "Receive SMS and email notifications when parcels are out for delivery."))))), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React19.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Need support?"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 leading-relaxed" }, "Our fulfillment team is online 7 days a week. Message us if you need to adjust delivery instructions or review dosage guidance.")))
10410
+ /* @__PURE__ */ React20.createElement("aside", { className: "space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-lg font-semibold text-slate-900" }, "Real-time milestones"), /* @__PURE__ */ React20.createElement("div", { className: "mt-4 space-y-4 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React20.createElement(Warehouse, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-800" }, "Preparation"), /* @__PURE__ */ React20.createElement("p", null, "Our pharmacists verify ingredients and pack thermo-sensitive items."))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React20.createElement(Truck, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-800" }, "In transit"), /* @__PURE__ */ React20.createElement("p", null, "Track live courier location with ETA updates tailored to your delivery window."))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4" }, /* @__PURE__ */ React20.createElement(BellRing, { className: "h-5 w-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold text-slate-800" }, "Arrival alerts"), /* @__PURE__ */ React20.createElement("p", null, "Receive SMS and email notifications when parcels are out for delivery."))))), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-primary-100 bg-primary-50/70 p-6 text-sm text-primary-700 shadow-sm" }, /* @__PURE__ */ React20.createElement("p", { className: "font-semibold uppercase tracking-[0.3em]" }, "Need support?"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 leading-relaxed" }, "Our fulfillment team is online 7 days a week. Message us if you need to adjust delivery instructions or review dosage guidance.")))
10316
10411
  ))));
10317
10412
  }
10318
10413
  var addressFormSchema = z.object({
@@ -10345,12 +10440,12 @@ function formatAddressSnippet(address) {
10345
10440
  function getAddressTypeCopy(type) {
10346
10441
  switch (type) {
10347
10442
  case "Billing":
10348
- return { label: "Billing", icon: /* @__PURE__ */ React19.createElement(Home, { className: "h-4 w-4" }) };
10443
+ return { label: "Billing", icon: /* @__PURE__ */ React20.createElement(Home, { className: "h-4 w-4" }) };
10349
10444
  case "Both":
10350
- return { label: "Billing & Shipping", icon: /* @__PURE__ */ React19.createElement(Globe, { className: "h-4 w-4" }) };
10445
+ return { label: "Billing & Shipping", icon: /* @__PURE__ */ React20.createElement(Globe, { className: "h-4 w-4" }) };
10351
10446
  case "Shipping":
10352
10447
  default:
10353
- return { label: "Shipping", icon: /* @__PURE__ */ React19.createElement(MapPin, { className: "h-4 w-4" }) };
10448
+ return { label: "Shipping", icon: /* @__PURE__ */ React20.createElement(MapPin, { className: "h-4 w-4" }) };
10354
10449
  }
10355
10450
  }
10356
10451
  function AddressesScreen() {
@@ -10494,18 +10589,18 @@ You can add it back at any time.`
10494
10589
  }
10495
10590
  ];
10496
10591
  }, [addresses]);
10497
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.3),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement(
10592
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.3),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement(
10498
10593
  motion.div,
10499
10594
  {
10500
10595
  initial: { opacity: 0, y: 24 },
10501
10596
  animate: { opacity: 1, y: 0 },
10502
10597
  className: "space-y-5"
10503
10598
  },
10504
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(MapPin, { className: "h-4 w-4" }), "Address book"),
10505
- /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Manage where your care arrives"),
10506
- /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Add home, office, or loved ones' addresses and toggle a default for lightning-fast checkout and delivery."),
10507
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-3 text-sm text-white/75" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4 text-white" }), "Default address: ", defaultAddress ? defaultAddress.name : "Not set"), /* @__PURE__ */ React19.createElement(Button, { variant: "ghost", className: "text-white hover:bg-white/10", onClick: openCreateModal }, /* @__PURE__ */ React19.createElement(Plus, { className: "h-5 w-5" }), "Add address"))
10508
- ), /* @__PURE__ */ React19.createElement(
10599
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(MapPin, { className: "h-4 w-4" }), "Address book"),
10600
+ /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Manage where your care arrives"),
10601
+ /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Add home, office, or loved ones' addresses and toggle a default for lightning-fast checkout and delivery."),
10602
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-3 text-sm text-white/75" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4 text-white" }), "Default address: ", defaultAddress ? defaultAddress.name : "Not set"), /* @__PURE__ */ React20.createElement(Button, { variant: "ghost", className: "text-white hover:bg-white/10", onClick: openCreateModal }, /* @__PURE__ */ React20.createElement(Plus, { className: "h-5 w-5" }), "Add address"))
10603
+ ), /* @__PURE__ */ React20.createElement(
10509
10604
  motion.div,
10510
10605
  {
10511
10606
  initial: { opacity: 0, y: 24 },
@@ -10513,14 +10608,14 @@ You can add it back at any time.`
10513
10608
  transition: { delay: 0.1 },
10514
10609
  className: "grid gap-4 rounded-3xl bg-white/15 p-6 text-sm text-white/80 backdrop-blur"
10515
10610
  },
10516
- stats.map((stat) => /* @__PURE__ */ React19.createElement("div", { key: stat.id, className: "flex items-center justify-between" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-white/70" }, stat.label), /* @__PURE__ */ React19.createElement("p", { className: "text-white" }, stat.helper)), /* @__PURE__ */ React19.createElement("span", { className: "text-3xl font-semibold text-white" }, stat.value)))
10517
- )))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, isLoading ? /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-3" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React19.createElement(
10611
+ stats.map((stat) => /* @__PURE__ */ React20.createElement("div", { key: stat.id, className: "flex items-center justify-between" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-semibold uppercase tracking-[0.3em] text-white/70" }, stat.label), /* @__PURE__ */ React20.createElement("p", { className: "text-white" }, stat.helper)), /* @__PURE__ */ React20.createElement("span", { className: "text-3xl font-semibold text-white" }, stat.value)))
10612
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-20" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-3" }, Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ React20.createElement(
10518
10613
  "div",
10519
10614
  {
10520
10615
  key: index,
10521
10616
  className: "h-56 animate-pulse rounded-3xl border border-slate-100 bg-white"
10522
10617
  }
10523
- ))) : error ? /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-red-100 bg-red-50 p-6 text-sm text-red-700" }, error.message) : addresses.length === 0 ? /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-12 shadow-sm" }, /* @__PURE__ */ React19.createElement(
10618
+ ))) : error ? /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-red-100 bg-red-50 p-6 text-sm text-red-700" }, error.message) : addresses.length === 0 ? /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl border border-slate-100 bg-white p-12 shadow-sm" }, /* @__PURE__ */ React20.createElement(
10524
10619
  EmptyState,
10525
10620
  {
10526
10621
  icon: MapPin,
@@ -10529,9 +10624,9 @@ You can add it back at any time.`
10529
10624
  actionLabel: "Add your first address",
10530
10625
  onAction: openCreateModal
10531
10626
  }
10532
- )) : /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-3" }, addresses.map((address) => {
10627
+ )) : /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-3" }, addresses.map((address) => {
10533
10628
  const typeCopy = getAddressTypeCopy(address.addressType);
10534
- return /* @__PURE__ */ React19.createElement(
10629
+ return /* @__PURE__ */ React20.createElement(
10535
10630
  motion.div,
10536
10631
  {
10537
10632
  key: address.id,
@@ -10539,39 +10634,39 @@ You can add it back at any time.`
10539
10634
  animate: { opacity: 1, y: 0 },
10540
10635
  className: "group relative flex h-full flex-col rounded-3xl border border-slate-100 bg-white p-6 shadow-sm transition hover:-translate-y-1 hover:shadow-xl"
10541
10636
  },
10542
- address.isDefault && /* @__PURE__ */ React19.createElement("span", { className: "absolute right-6 top-6 inline-flex items-center gap-2 rounded-full bg-amber-100 px-3 py-1 text-xs font-semibold text-amber-700" }, /* @__PURE__ */ React19.createElement(Crown, { className: "h-4 w-4" }), "Default"),
10543
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement("span", { className: "rounded-full bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React19.createElement(User, { className: "h-5 w-5" })), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("p", { className: "text-base font-semibold text-slate-900" }, address.name), /* @__PURE__ */ React19.createElement("p", { className: "text-xs uppercase tracking-[0.3em] text-slate-400" }, typeCopy.label))),
10544
- /* @__PURE__ */ React19.createElement("div", { className: "mt-6 flex flex-1 flex-col gap-3 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("p", null, formatAddressSnippet(address)), /* @__PURE__ */ React19.createElement("p", { className: "inline-flex items-center gap-2 text-slate-500" }, /* @__PURE__ */ React19.createElement(Phone, { className: "h-4 w-4 text-slate-400" }), address.phone || "Not provided")),
10545
- /* @__PURE__ */ React19.createElement("div", { className: "mt-6 flex items-center justify-between gap-3" }, /* @__PURE__ */ React19.createElement(
10637
+ address.isDefault && /* @__PURE__ */ React20.createElement("span", { className: "absolute right-6 top-6 inline-flex items-center gap-2 rounded-full bg-amber-100 px-3 py-1 text-xs font-semibold text-amber-700" }, /* @__PURE__ */ React20.createElement(Crown, { className: "h-4 w-4" }), "Default"),
10638
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement("span", { className: "rounded-full bg-primary-50 p-3 text-primary-600" }, /* @__PURE__ */ React20.createElement(User, { className: "h-5 w-5" })), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("p", { className: "text-base font-semibold text-slate-900" }, address.name), /* @__PURE__ */ React20.createElement("p", { className: "text-xs uppercase tracking-[0.3em] text-slate-400" }, typeCopy.label))),
10639
+ /* @__PURE__ */ React20.createElement("div", { className: "mt-6 flex flex-1 flex-col gap-3 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("p", null, formatAddressSnippet(address)), /* @__PURE__ */ React20.createElement("p", { className: "inline-flex items-center gap-2 text-slate-500" }, /* @__PURE__ */ React20.createElement(Phone, { className: "h-4 w-4 text-slate-400" }), address.phone || "Not provided")),
10640
+ /* @__PURE__ */ React20.createElement("div", { className: "mt-6 flex items-center justify-between gap-3" }, /* @__PURE__ */ React20.createElement(
10546
10641
  "button",
10547
10642
  {
10548
10643
  type: "button",
10549
10644
  onClick: () => openEditModal(address),
10550
10645
  className: "inline-flex items-center gap-2 rounded-full border border-slate-200 px-3 py-1 text-sm font-medium text-slate-600 transition hover:border-primary-300 hover:text-primary-600"
10551
10646
  },
10552
- /* @__PURE__ */ React19.createElement(Edit3, { className: "h-4 w-4" }),
10647
+ /* @__PURE__ */ React20.createElement(Edit3, { className: "h-4 w-4" }),
10553
10648
  "Edit"
10554
- ), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, !address.isDefault && /* @__PURE__ */ React19.createElement(
10649
+ ), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, !address.isDefault && /* @__PURE__ */ React20.createElement(
10555
10650
  "button",
10556
10651
  {
10557
10652
  type: "button",
10558
10653
  onClick: () => handleSetDefault(address),
10559
10654
  className: "inline-flex items-center gap-2 rounded-full border border-amber-200 px-3 py-1 text-sm font-semibold text-amber-600 transition hover:border-amber-300 hover:text-amber-700"
10560
10655
  },
10561
- /* @__PURE__ */ React19.createElement(Star, { className: "h-4 w-4" }),
10656
+ /* @__PURE__ */ React20.createElement(Star, { className: "h-4 w-4" }),
10562
10657
  "Make default"
10563
- ), /* @__PURE__ */ React19.createElement(
10658
+ ), /* @__PURE__ */ React20.createElement(
10564
10659
  "button",
10565
10660
  {
10566
10661
  type: "button",
10567
10662
  onClick: () => handleDelete(address),
10568
10663
  className: "inline-flex items-center gap-2 rounded-full border border-red-200 px-3 py-1 text-sm font-semibold text-red-600 transition hover:border-red-300 hover:text-red-700"
10569
10664
  },
10570
- /* @__PURE__ */ React19.createElement(Trash2, { className: "h-4 w-4" }),
10665
+ /* @__PURE__ */ React20.createElement(Trash2, { className: "h-4 w-4" }),
10571
10666
  "Delete"
10572
10667
  )))
10573
10668
  );
10574
- })))), /* @__PURE__ */ React19.createElement(
10669
+ })))), /* @__PURE__ */ React20.createElement(
10575
10670
  Modal,
10576
10671
  {
10577
10672
  isOpen: isModalOpen,
@@ -10579,7 +10674,7 @@ You can add it back at any time.`
10579
10674
  title: editingAddress ? "Edit address" : "Add new address",
10580
10675
  size: "lg"
10581
10676
  },
10582
- /* @__PURE__ */ React19.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6" }, /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement(
10677
+ /* @__PURE__ */ React20.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6" }, /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement(
10583
10678
  Input,
10584
10679
  {
10585
10680
  label: "Full name",
@@ -10587,7 +10682,7 @@ You can add it back at any time.`
10587
10682
  ...register("fullName"),
10588
10683
  error: errors.fullName?.message
10589
10684
  }
10590
- ), /* @__PURE__ */ React19.createElement(
10685
+ ), /* @__PURE__ */ React20.createElement(
10591
10686
  Input,
10592
10687
  {
10593
10688
  label: "Phone number",
@@ -10595,7 +10690,7 @@ You can add it back at any time.`
10595
10690
  ...register("phone"),
10596
10691
  error: errors.phone?.message
10597
10692
  }
10598
- )), /* @__PURE__ */ React19.createElement(
10693
+ )), /* @__PURE__ */ React20.createElement(
10599
10694
  Input,
10600
10695
  {
10601
10696
  label: "Address line 1",
@@ -10603,7 +10698,7 @@ You can add it back at any time.`
10603
10698
  ...register("addressLine1"),
10604
10699
  error: errors.addressLine1?.message
10605
10700
  }
10606
- ), /* @__PURE__ */ React19.createElement(
10701
+ ), /* @__PURE__ */ React20.createElement(
10607
10702
  Input,
10608
10703
  {
10609
10704
  label: "Address line 2 (optional)",
@@ -10611,7 +10706,7 @@ You can add it back at any time.`
10611
10706
  ...register("addressLine2"),
10612
10707
  error: errors.addressLine2?.message
10613
10708
  }
10614
- ), /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement(
10709
+ ), /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement(
10615
10710
  Input,
10616
10711
  {
10617
10712
  label: "City",
@@ -10619,7 +10714,7 @@ You can add it back at any time.`
10619
10714
  ...register("city"),
10620
10715
  error: errors.city?.message
10621
10716
  }
10622
- ), /* @__PURE__ */ React19.createElement(
10717
+ ), /* @__PURE__ */ React20.createElement(
10623
10718
  Input,
10624
10719
  {
10625
10720
  label: "State / Region",
@@ -10627,7 +10722,7 @@ You can add it back at any time.`
10627
10722
  ...register("state"),
10628
10723
  error: errors.state?.message
10629
10724
  }
10630
- )), /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement(
10725
+ )), /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement(
10631
10726
  Input,
10632
10727
  {
10633
10728
  label: "Postal code",
@@ -10635,7 +10730,7 @@ You can add it back at any time.`
10635
10730
  ...register("zipCode"),
10636
10731
  error: errors.zipCode?.message
10637
10732
  }
10638
- ), /* @__PURE__ */ React19.createElement(
10733
+ ), /* @__PURE__ */ React20.createElement(
10639
10734
  Input,
10640
10735
  {
10641
10736
  label: "Country",
@@ -10643,23 +10738,23 @@ You can add it back at any time.`
10643
10738
  ...register("country"),
10644
10739
  error: errors.country?.message
10645
10740
  }
10646
- )), /* @__PURE__ */ React19.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React19.createElement("label", { className: "flex flex-col gap-2 rounded-2xl border border-slate-200 p-4" }, /* @__PURE__ */ React19.createElement("span", { className: "text-sm font-semibold text-slate-700" }, "Address type"), /* @__PURE__ */ React19.createElement(
10741
+ )), /* @__PURE__ */ React20.createElement("div", { className: "grid gap-4 md:grid-cols-2" }, /* @__PURE__ */ React20.createElement("label", { className: "flex flex-col gap-2 rounded-2xl border border-slate-200 p-4" }, /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-semibold text-slate-700" }, "Address type"), /* @__PURE__ */ React20.createElement(
10647
10742
  "select",
10648
10743
  {
10649
10744
  ...register("addressType"),
10650
10745
  className: "rounded-xl border border-slate-200 px-3 py-2 text-sm text-slate-700 focus:border-primary-400 focus:outline-none focus:ring-2 focus:ring-primary-500/20"
10651
10746
  },
10652
- /* @__PURE__ */ React19.createElement("option", { value: "Shipping" }, "Shipping"),
10653
- /* @__PURE__ */ React19.createElement("option", { value: "Billing" }, "Billing"),
10654
- /* @__PURE__ */ React19.createElement("option", { value: "Both" }, "Billing & Shipping")
10655
- )), /* @__PURE__ */ React19.createElement("label", { className: "flex items-center justify-between gap-4 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm font-medium text-slate-700" }, /* @__PURE__ */ React19.createElement("span", null, "Set as default address"), /* @__PURE__ */ React19.createElement(
10747
+ /* @__PURE__ */ React20.createElement("option", { value: "Shipping" }, "Shipping"),
10748
+ /* @__PURE__ */ React20.createElement("option", { value: "Billing" }, "Billing"),
10749
+ /* @__PURE__ */ React20.createElement("option", { value: "Both" }, "Billing & Shipping")
10750
+ )), /* @__PURE__ */ React20.createElement("label", { className: "flex items-center justify-between gap-4 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm font-medium text-slate-700" }, /* @__PURE__ */ React20.createElement("span", null, "Set as default address"), /* @__PURE__ */ React20.createElement(
10656
10751
  "input",
10657
10752
  {
10658
10753
  type: "checkbox",
10659
10754
  ...register("isDefault"),
10660
10755
  className: "h-4 w-4 rounded border-primary-300 text-primary-600 focus:ring-primary-500"
10661
10756
  }
10662
- ))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-end gap-3" }, /* @__PURE__ */ React19.createElement(Button, { type: "button", variant: "outline", onClick: closeModal }, "Cancel"), /* @__PURE__ */ React19.createElement(Button, { type: "submit", isLoading: isSubmitting }, editingAddress ? "Save changes" : "Save address")))
10757
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-end gap-3" }, /* @__PURE__ */ React20.createElement(Button, { type: "button", variant: "outline", onClick: closeModal }, "Cancel"), /* @__PURE__ */ React20.createElement(Button, { type: "submit", isLoading: isSubmitting }, editingAddress ? "Save changes" : "Save address")))
10663
10758
  ));
10664
10759
  }
10665
10760
  function useWishlistProducts(productIds = []) {
@@ -10718,6 +10813,7 @@ var SORT_OPTIONS = [
10718
10813
  ];
10719
10814
  function WishlistScreen() {
10720
10815
  const router = useRouter();
10816
+ const { buildPath } = useBasePath();
10721
10817
  const { isAuthenticated } = useAuth() || {};
10722
10818
  const {
10723
10819
  products: wishlistItems,
@@ -10798,14 +10894,14 @@ function WishlistScreen() {
10798
10894
  return list;
10799
10895
  }, [wishlistProducts, onlyInStock, sortOption]);
10800
10896
  const emptyAfterFiltering = !isLoading && wishlistProducts.length > 0 && processedProducts.length === 0;
10801
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50 pb-16" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] pb-32 pt-16 text-white" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 opacity-40 mix-blend-soft-light", "aria-hidden": "true" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute -top-1/2 right-1/2 h-[40rem] w-[40rem] rounded-full bg-white/10 blur-3xl" }), /* @__PURE__ */ React19.createElement("div", { className: "absolute left-1/4 top-1/4 h-48 w-48 rounded-full bg-white/20 blur-2xl" })), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "max-w-3xl space-y-6" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(Heart, { className: "h-4 w-4" }), "Wishlist"), /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-5xl" }, "Curate your pharmacy must-haves in one calming space"), /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "We keep your favourite products ready for reorder, refill reminders, and quick checkout\u2014exactly when you need them.")))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-20" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement(
10897
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50 pb-16" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] pb-32 pt-16 text-white" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 opacity-40 mix-blend-soft-light", "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute -top-1/2 right-1/2 h-[40rem] w-[40rem] rounded-full bg-white/10 blur-3xl" }), /* @__PURE__ */ React20.createElement("div", { className: "absolute left-1/4 top-1/4 h-48 w-48 rounded-full bg-white/20 blur-2xl" })), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "max-w-3xl space-y-6" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(Heart, { className: "h-4 w-4" }), "Wishlist"), /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold leading-tight md:text-5xl" }, "Curate your pharmacy must-haves in one calming space"), /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "We keep your favourite products ready for reorder, refill reminders, and quick checkout\u2014exactly when you need them.")))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-20" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement(
10802
10898
  motion.div,
10803
10899
  {
10804
10900
  initial: { opacity: 0, y: 24 },
10805
10901
  animate: { opacity: 1, y: 0 },
10806
10902
  className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-xl shadow-primary-50"
10807
10903
  },
10808
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-6" }, !isAuthenticated && /* @__PURE__ */ React19.createElement("div", { className: "flex min-h-[40vh] items-center justify-center" }, /* @__PURE__ */ React19.createElement("div", { className: "max-w-lg rounded-3xl border border-slate-100 bg-white p-10 text-center shadow-lg shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", { className: "mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary-50 text-primary-600" }, /* @__PURE__ */ React19.createElement(Heart, { className: "h-8 w-8" })), /* @__PURE__ */ React19.createElement("h2", { className: "mt-6 text-3xl font-bold text-slate-900" }, "Sign in to see your favourites"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-slate-500" }, "Create your curated shelf of products and we'll keep them ready whenever you return."), /* @__PURE__ */ React19.createElement(Button, { className: "mt-6", onClick: () => router.push("/login") }, "Sign In"))), isAuthenticated && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React19.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "Your saved collection"), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, "Total value: ", /* @__PURE__ */ React19.createElement("span", { className: "font-semibold text-primary-600" }, formatPrice(totalValue)), onlyInStock && " \u2022 Showing items ready to ship")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-3" }, /* @__PURE__ */ React19.createElement("label", { className: "inline-flex cursor-pointer items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-sm font-medium text-slate-600 transition hover:border-primary-200 hover:text-primary-600" }, /* @__PURE__ */ React19.createElement(
10904
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-6" }, !isAuthenticated && /* @__PURE__ */ React20.createElement("div", { className: "flex min-h-[40vh] items-center justify-center" }, /* @__PURE__ */ React20.createElement("div", { className: "max-w-lg rounded-3xl border border-slate-100 bg-white p-10 text-center shadow-lg shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", { className: "mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary-50 text-primary-600" }, /* @__PURE__ */ React20.createElement(Heart, { className: "h-8 w-8" })), /* @__PURE__ */ React20.createElement("h2", { className: "mt-6 text-3xl font-bold text-slate-900" }, "Sign in to see your favourites"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-slate-500" }, "Create your curated shelf of products and we'll keep them ready whenever you return."), /* @__PURE__ */ React20.createElement(Button, { className: "mt-6", onClick: () => router.push(buildPath("/login")) }, "Sign In"))), isAuthenticated && /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("h2", { className: "text-2xl font-semibold text-slate-900" }, "Your saved collection"), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, "Total value: ", /* @__PURE__ */ React20.createElement("span", { className: "font-semibold text-primary-600" }, formatPrice(totalValue)), onlyInStock && " \u2022 Showing items ready to ship")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-3" }, /* @__PURE__ */ React20.createElement("label", { className: "inline-flex cursor-pointer items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-sm font-medium text-slate-600 transition hover:border-primary-200 hover:text-primary-600" }, /* @__PURE__ */ React20.createElement(
10809
10905
  "input",
10810
10906
  {
10811
10907
  type: "checkbox",
@@ -10813,54 +10909,54 @@ function WishlistScreen() {
10813
10909
  onChange: (event) => setOnlyInStock(event.target.checked),
10814
10910
  className: "h-4 w-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"
10815
10911
  }
10816
- ), "Only show in-stock"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-sm text-slate-600" }, /* @__PURE__ */ React19.createElement("span", null, "Sort"), /* @__PURE__ */ React19.createElement(
10912
+ ), "Only show in-stock"), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-sm text-slate-600" }, /* @__PURE__ */ React20.createElement("span", null, "Sort"), /* @__PURE__ */ React20.createElement(
10817
10913
  "select",
10818
10914
  {
10819
10915
  value: sortOption,
10820
10916
  onChange: (event) => setSortOption(event.target.value),
10821
10917
  className: "bg-transparent text-sm font-medium text-slate-700 outline-none"
10822
10918
  },
10823
- SORT_OPTIONS.map((option) => /* @__PURE__ */ React19.createElement("option", { key: option.value, value: option.value }, option.label))
10824
- )), /* @__PURE__ */ React19.createElement("div", { className: "flex overflow-hidden rounded-full border border-slate-200 bg-slate-50" }, /* @__PURE__ */ React19.createElement(
10919
+ SORT_OPTIONS.map((option) => /* @__PURE__ */ React20.createElement("option", { key: option.value, value: option.value }, option.label))
10920
+ )), /* @__PURE__ */ React20.createElement("div", { className: "flex overflow-hidden rounded-full border border-slate-200 bg-slate-50" }, /* @__PURE__ */ React20.createElement(
10825
10921
  "button",
10826
10922
  {
10827
10923
  type: "button",
10828
10924
  onClick: () => setViewMode("grid"),
10829
10925
  className: `flex items-center gap-1 px-3 py-1.5 text-sm font-medium transition ${viewMode === "grid" ? "bg-primary-600 text-white shadow-lg shadow-primary-500/30" : "text-slate-600 hover:bg-white"}`
10830
10926
  },
10831
- /* @__PURE__ */ React19.createElement(Grid, { className: "h-4 w-4" }),
10927
+ /* @__PURE__ */ React20.createElement(Grid, { className: "h-4 w-4" }),
10832
10928
  "Grid"
10833
- ), /* @__PURE__ */ React19.createElement(
10929
+ ), /* @__PURE__ */ React20.createElement(
10834
10930
  "button",
10835
10931
  {
10836
10932
  type: "button",
10837
10933
  onClick: () => setViewMode("list"),
10838
10934
  className: `flex items-center gap-1 px-3 py-1.5 text-sm font-medium transition ${viewMode === "list" ? "bg-primary-600 text-white shadow-lg shadow-primary-500/30" : "text-slate-600 hover:bg-white"}`
10839
10935
  },
10840
- /* @__PURE__ */ React19.createElement(List, { className: "h-4 w-4" }),
10936
+ /* @__PURE__ */ React20.createElement(List, { className: "h-4 w-4" }),
10841
10937
  "List"
10842
- )), wishlistCount > 0 && /* @__PURE__ */ React19.createElement(
10938
+ )), wishlistCount > 0 && /* @__PURE__ */ React20.createElement(
10843
10939
  Button,
10844
10940
  {
10845
10941
  variant: "ghost",
10846
10942
  className: "text-sm font-semibold text-slate-500 hover:text-red-500",
10847
10943
  onClick: handleClearWishlist
10848
10944
  },
10849
- /* @__PURE__ */ React19.createElement(Trash2, { className: "h-4 w-4" }),
10945
+ /* @__PURE__ */ React20.createElement(Trash2, { className: "h-4 w-4" }),
10850
10946
  "Clear all"
10851
- ))), isLoading && /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3" }, Array.from({ length: Math.min(wishlistCount || 3, 6) }).map((_, index) => /* @__PURE__ */ React19.createElement(
10947
+ ))), isLoading && /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3" }, Array.from({ length: Math.min(wishlistCount || 3, 6) }).map((_, index) => /* @__PURE__ */ React20.createElement(
10852
10948
  "div",
10853
10949
  {
10854
10950
  key: index,
10855
10951
  className: "h-72 animate-pulse rounded-2xl border border-slate-200 bg-slate-100"
10856
10952
  }
10857
- ))), !isLoading && wishlistCount === 0 && /* @__PURE__ */ React19.createElement("div", { className: "flex min-h-[30vh] items-center justify-center" }, /* @__PURE__ */ React19.createElement("div", { className: "max-w-2xl rounded-3xl border border-slate-100 bg-white p-12 text-center shadow-xl shadow-primary-50" }, /* @__PURE__ */ React19.createElement("div", { className: "mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-primary-100 text-primary-600" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-10 w-10" })), /* @__PURE__ */ React19.createElement("h2", { className: "mt-6 text-4xl font-bold text-slate-900" }, "Start your wellness wishlist"), /* @__PURE__ */ React19.createElement("p", { className: "mt-4 text-lg text-slate-500" }, "Bookmark pharmacy essentials, supplements, or skincare picks and we'll keep them safe until you're ready to checkout."), /* @__PURE__ */ React19.createElement("div", { className: "mt-8 flex flex-wrap justify-center gap-3" }, /* @__PURE__ */ React19.createElement(Button, { onClick: () => router.push("/shop") }, "Discover products"), /* @__PURE__ */ React19.createElement(Button, { variant: "outline", onClick: () => router.push("/categories") }, "Browse categories")))), !isLoading && processedProducts.length > 0 && /* @__PURE__ */ React19.createElement(React19.Fragment, null, viewMode === "grid" ? /* @__PURE__ */ React19.createElement(
10953
+ ))), !isLoading && wishlistCount === 0 && /* @__PURE__ */ React20.createElement("div", { className: "flex min-h-[30vh] items-center justify-center" }, /* @__PURE__ */ React20.createElement("div", { className: "max-w-2xl rounded-3xl border border-slate-100 bg-white p-12 text-center shadow-xl shadow-primary-50" }, /* @__PURE__ */ React20.createElement("div", { className: "mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-primary-100 text-primary-600" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-10 w-10" })), /* @__PURE__ */ React20.createElement("h2", { className: "mt-6 text-4xl font-bold text-slate-900" }, "Start your wellness wishlist"), /* @__PURE__ */ React20.createElement("p", { className: "mt-4 text-lg text-slate-500" }, "Bookmark pharmacy essentials, supplements, or skincare picks and we'll keep them safe until you're ready to checkout."), /* @__PURE__ */ React20.createElement("div", { className: "mt-8 flex flex-wrap justify-center gap-3" }, /* @__PURE__ */ React20.createElement(Button, { onClick: () => router.push(buildPath("/shop")) }, "Discover products"), /* @__PURE__ */ React20.createElement(Button, { variant: "outline", onClick: () => router.push(buildPath("/categories")) }, "Browse categories")))), !isLoading && processedProducts.length > 0 && /* @__PURE__ */ React20.createElement(React20.Fragment, null, viewMode === "grid" ? /* @__PURE__ */ React20.createElement(
10858
10954
  motion.div,
10859
10955
  {
10860
10956
  layout: true,
10861
10957
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-3"
10862
10958
  },
10863
- /* @__PURE__ */ React19.createElement(AnimatePresence, null, processedProducts.map((product) => /* @__PURE__ */ React19.createElement(
10959
+ /* @__PURE__ */ React20.createElement(AnimatePresence, null, processedProducts.map((product) => /* @__PURE__ */ React20.createElement(
10864
10960
  motion.div,
10865
10961
  {
10866
10962
  key: product.id,
@@ -10870,17 +10966,17 @@ function WishlistScreen() {
10870
10966
  exit: { opacity: 0, y: -20 },
10871
10967
  transition: { duration: 0.2 }
10872
10968
  },
10873
- /* @__PURE__ */ React19.createElement(
10969
+ /* @__PURE__ */ React20.createElement(
10874
10970
  ProductCard,
10875
10971
  {
10876
10972
  product,
10877
- onClickProduct: (p) => router.push(`/products/${p.id}`),
10973
+ onClickProduct: (p) => router.push(buildPath(`/products/${p.id}`)),
10878
10974
  onFavorite: () => handleRemoveFromWishlist(product.id),
10879
10975
  isFavorited: true
10880
10976
  }
10881
10977
  )
10882
10978
  )))
10883
- ) : /* @__PURE__ */ React19.createElement(motion.div, { layout: true, className: "space-y-4" }, /* @__PURE__ */ React19.createElement(AnimatePresence, null, processedProducts.map((product) => /* @__PURE__ */ React19.createElement(
10979
+ ) : /* @__PURE__ */ React20.createElement(motion.div, { layout: true, className: "space-y-4" }, /* @__PURE__ */ React20.createElement(AnimatePresence, null, processedProducts.map((product) => /* @__PURE__ */ React20.createElement(
10884
10980
  motion.div,
10885
10981
  {
10886
10982
  key: product.id,
@@ -10891,7 +10987,7 @@ function WishlistScreen() {
10891
10987
  transition: { duration: 0.2 },
10892
10988
  className: "flex flex-col gap-4 rounded-2xl border border-slate-100 bg-slate-50 p-4 shadow-sm shadow-primary-50 sm:flex-row sm:items-center"
10893
10989
  },
10894
- /* @__PURE__ */ React19.createElement("div", { className: "relative h-28 w-full overflow-hidden rounded-2xl bg-white sm:w-40" }, /* @__PURE__ */ React19.createElement(
10990
+ /* @__PURE__ */ React20.createElement("div", { className: "relative h-28 w-full overflow-hidden rounded-2xl bg-white sm:w-40" }, /* @__PURE__ */ React20.createElement(
10895
10991
  Image3,
10896
10992
  {
10897
10993
  fill: true,
@@ -10900,14 +10996,14 @@ function WishlistScreen() {
10900
10996
  className: "h-full w-full object-cover"
10901
10997
  }
10902
10998
  )),
10903
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-1 flex-col gap-2" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center justify-between gap-3" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, product.name), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-500" }, product.parentCategories?.map((category) => category?.name).join(", ") || "General wellness")), /* @__PURE__ */ React19.createElement("div", { className: "text-right" }, /* @__PURE__ */ React19.createElement("p", { className: "text-lg font-bold text-primary-600" }, formatPrice(product.finalPrice ?? 0)), product.isDiscounted && /* @__PURE__ */ React19.createElement("p", { className: "text-xs text-emerald-500" }, "You save ", formatPrice(Math.max((product.priceBeforeDiscount ?? 0) - (product.finalPrice ?? 0), 0))))), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap items-center gap-3 text-xs text-slate-500" }, /* @__PURE__ */ React19.createElement("span", { className: `inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-medium ${product.inventoryCount > 0 ? "bg-emerald-100 text-emerald-700" : "bg-rose-100 text-rose-700"}` }, /* @__PURE__ */ React19.createElement(Package, { className: "h-3.5 w-3.5" }), product.inventoryCount > 0 ? "In stock" : "Backordered"), product.totalSold > 0 && /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-slate-200 px-2.5 py-1 font-medium text-slate-700" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-3.5 w-3.5" }), product.totalSold, "+ purchased")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-wrap gap-2" }, /* @__PURE__ */ React19.createElement(
10999
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-1 flex-col gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center justify-between gap-3" }, /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-slate-900" }, product.name), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-500" }, product.parentCategories?.map((category) => category?.name).join(", ") || "General wellness")), /* @__PURE__ */ React20.createElement("div", { className: "text-right" }, /* @__PURE__ */ React20.createElement("p", { className: "text-lg font-bold text-primary-600" }, formatPrice(product.finalPrice ?? 0)), product.isDiscounted && /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-emerald-500" }, "You save ", formatPrice(Math.max((product.priceBeforeDiscount ?? 0) - (product.finalPrice ?? 0), 0))))), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap items-center gap-3 text-xs text-slate-500" }, /* @__PURE__ */ React20.createElement("span", { className: `inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-medium ${product.inventoryCount > 0 ? "bg-emerald-100 text-emerald-700" : "bg-rose-100 text-rose-700"}` }, /* @__PURE__ */ React20.createElement(Package, { className: "h-3.5 w-3.5" }), product.inventoryCount > 0 ? "In stock" : "Backordered"), product.totalSold > 0 && /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-slate-200 px-2.5 py-1 font-medium text-slate-700" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-3.5 w-3.5" }), product.totalSold, "+ purchased")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-wrap gap-2" }, /* @__PURE__ */ React20.createElement(
10904
11000
  Button,
10905
11001
  {
10906
11002
  size: "sm",
10907
- onClick: () => router.push(`/products/${product.id}`)
11003
+ onClick: () => router.push(buildPath(`/products/${product.id}`))
10908
11004
  },
10909
11005
  "View details"
10910
- ), /* @__PURE__ */ React19.createElement(
11006
+ ), /* @__PURE__ */ React20.createElement(
10911
11007
  Button,
10912
11008
  {
10913
11009
  size: "sm",
@@ -10917,11 +11013,12 @@ function WishlistScreen() {
10917
11013
  },
10918
11014
  "Remove"
10919
11015
  )))
10920
- ))))), isAuthenticated && emptyAfterFiltering && /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-12 text-center" }, /* @__PURE__ */ React19.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-slate-200 text-slate-500" }, /* @__PURE__ */ React19.createElement(Package, { className: "h-8 w-8" })), /* @__PURE__ */ React19.createElement("h3", { className: "mt-6 text-2xl font-semibold text-slate-900" }, "Nothing matches those filters"), /* @__PURE__ */ React19.createElement("p", { className: "mt-2 max-w-md text-sm text-slate-500" }, "Try showing out-of-stock items or adjust your sort order to revisit everything you\u2019ve saved."), /* @__PURE__ */ React19.createElement(Button, { className: "mt-6", variant: "outline", onClick: () => setOnlyInStock(false) }, "Show all saved products"))))
11016
+ ))))), isAuthenticated && emptyAfterFiltering && /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-12 text-center" }, /* @__PURE__ */ React20.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-slate-200 text-slate-500" }, /* @__PURE__ */ React20.createElement(Package, { className: "h-8 w-8" })), /* @__PURE__ */ React20.createElement("h3", { className: "mt-6 text-2xl font-semibold text-slate-900" }, "Nothing matches those filters"), /* @__PURE__ */ React20.createElement("p", { className: "mt-2 max-w-md text-sm text-slate-500" }, "Try showing out-of-stock items or adjust your sort order to revisit everything you\u2019ve saved."), /* @__PURE__ */ React20.createElement(Button, { className: "mt-6", variant: "outline", onClick: () => setOnlyInStock(false) }, "Show all saved products"))))
10921
11017
  ))));
10922
11018
  }
10923
11019
  function SearchPage() {
10924
11020
  const router = useRouter();
11021
+ const { buildPath } = useBasePath();
10925
11022
  const searchParams = useSearchParams();
10926
11023
  const searchQuery = searchParams.get("q") || "";
10927
11024
  const [products, setProducts] = useState([]);
@@ -11022,38 +11119,39 @@ function SearchPage() {
11022
11119
  {
11023
11120
  product,
11024
11121
  isFavorited: isInWishlist(product.id),
11025
- onClickProduct: (p) => router.push(`/products/${p.id}`)
11122
+ onClickProduct: (p) => router.push(buildPath(`/products/${p.id}`))
11026
11123
  }
11027
11124
  ))) : hasSearched ? /* @__PURE__ */ React.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React.createElement("div", { className: "text-gray-500 text-lg mb-4" }, 'No products found for "', searchQuery, '"'), /* @__PURE__ */ React.createElement("p", { className: "text-gray-500 mb-6" }, "Try different keywords or check out our", " ", /* @__PURE__ */ React.createElement(Link8, { href: "/shop", className: "text-primary-600 hover:underline ml-1 font-medium" }, "featured products"))) : /* @__PURE__ */ React.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React.createElement("p", { className: "text-gray-500" }, "Enter a search term to find products"))));
11028
11125
  }
11029
11126
  function CategoriesScreen() {
11030
11127
  const { categories, isLoading } = useCategories();
11031
11128
  const router = useRouter();
11032
- return /* @__PURE__ */ React19.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React19.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React19.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement(
11129
+ const { buildPath } = useBasePath();
11130
+ return /* @__PURE__ */ React20.createElement("div", { className: "min-h-screen bg-slate-50" }, /* @__PURE__ */ React20.createElement("section", { className: "relative overflow-hidden bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))] text-white mb-8" }, /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(255,255,255,0.35),_transparent_60%)]" }), /* @__PURE__ */ React20.createElement("div", { className: "relative container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement(
11033
11131
  motion.div,
11034
11132
  {
11035
11133
  initial: { opacity: 0, y: 24 },
11036
11134
  animate: { opacity: 1, y: 0 },
11037
11135
  className: "space-y-6"
11038
11136
  },
11039
- /* @__PURE__ */ React19.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React19.createElement(Package, { className: "h-4 w-4" }), "Product Categories"),
11040
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React19.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Browse Our Product Range"), /* @__PURE__ */ React19.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Explore our comprehensive selection of healthcare products, carefully curated by our pharmacists to meet all your wellness needs.")), /* @__PURE__ */ React19.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick tip"), /* @__PURE__ */ React19.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Use the categories below to quickly find the products you're looking for, or use the search function for specific items.")))
11041
- ))), /* @__PURE__ */ React19.createElement("div", { className: "relative -mt-16 pb-16" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement(
11137
+ /* @__PURE__ */ React20.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-semibold uppercase tracking-[0.35em] text-white/70 backdrop-blur" }, /* @__PURE__ */ React20.createElement(Package, { className: "h-4 w-4" }), "Product Categories"),
11138
+ /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React20.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Browse Our Product Range"), /* @__PURE__ */ React20.createElement("p", { className: "max-w-2xl text-white/80 md:text-lg" }, "Explore our comprehensive selection of healthcare products, carefully curated by our pharmacists to meet all your wellness needs.")), /* @__PURE__ */ React20.createElement("div", { className: "rounded-3xl bg-white/15 p-6 backdrop-blur" }, /* @__PURE__ */ React20.createElement("p", { className: "text-sm font-semibold uppercase tracking-[0.35em] text-white/70" }, "Quick tip"), /* @__PURE__ */ React20.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Use the categories below to quickly find the products you're looking for, or use the search function for specific items.")))
11139
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "relative -mt-16 pb-16" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement(
11042
11140
  motion.div,
11043
11141
  {
11044
11142
  initial: { opacity: 0, y: 24 },
11045
11143
  animate: { opacity: 1, y: 0 },
11046
11144
  className: "rounded-3xl border border-slate-100 bg-white p-6 shadow-lg shadow-primary-50"
11047
11145
  },
11048
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3 text-sm text-slate-500 mb-6" }, /* @__PURE__ */ React19.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "Browse our complete product catalog organized by categories.")),
11049
- isLoading ? /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" }, [...Array(8)].map((_, i) => /* @__PURE__ */ React19.createElement("div", { key: i, className: "animate-pulse" }, /* @__PURE__ */ React19.createElement("div", { className: "bg-gray-200 rounded-lg aspect-square mb-2" }), /* @__PURE__ */ React19.createElement("div", { className: "h-4 bg-gray-200 rounded w-3/4 mb-1" }), /* @__PURE__ */ React19.createElement("div", { className: "h-3 bg-gray-200 rounded w-1/2" })))) : categories.length > 0 ? /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" }, categories.map((category) => /* @__PURE__ */ React19.createElement(
11146
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3 text-sm text-slate-500 mb-6" }, /* @__PURE__ */ React20.createElement(Sparkles, { className: "h-4 w-4 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "Browse our complete product catalog organized by categories.")),
11147
+ isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" }, [...Array(8)].map((_, i) => /* @__PURE__ */ React20.createElement("div", { key: i, className: "animate-pulse" }, /* @__PURE__ */ React20.createElement("div", { className: "bg-gray-200 rounded-lg aspect-square mb-2" }), /* @__PURE__ */ React20.createElement("div", { className: "h-4 bg-gray-200 rounded w-3/4 mb-1" }), /* @__PURE__ */ React20.createElement("div", { className: "h-3 bg-gray-200 rounded w-1/2" })))) : categories.length > 0 ? /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" }, categories.map((category) => /* @__PURE__ */ React20.createElement(
11050
11148
  Link8,
11051
11149
  {
11052
11150
  key: category.id,
11053
- href: `/shop?category=${category.name}`,
11151
+ href: buildPath(`/shop?category=${category.name}`),
11054
11152
  className: "group block overflow-hidden rounded-xl border border-gray-100 bg-white p-4 text-center transition hover:shadow-lg hover:border-primary-500"
11055
11153
  },
11056
- /* @__PURE__ */ React19.createElement("div", { className: "relative aspect-square w-full overflow-hidden rounded-lg bg-gray-50 mb-3" }, category.image ? /* @__PURE__ */ React19.createElement(
11154
+ /* @__PURE__ */ React20.createElement("div", { className: "relative aspect-square w-full overflow-hidden rounded-lg bg-gray-50 mb-3" }, category.image ? /* @__PURE__ */ React20.createElement(
11057
11155
  Image3,
11058
11156
  {
11059
11157
  src: category.image,
@@ -11062,17 +11160,17 @@ function CategoriesScreen() {
11062
11160
  className: "object-cover transition-transform group-hover:scale-105",
11063
11161
  sizes: "(max-width: 768px) 50vw, (max-width: 1200px) 33vw, 25vw"
11064
11162
  }
11065
- ) : /* @__PURE__ */ React19.createElement("div", { className: "flex h-full w-full items-center justify-center bg-gray-100 text-gray-400" }, /* @__PURE__ */ React19.createElement(Package, { className: "h-12 w-12" }))),
11066
- /* @__PURE__ */ React19.createElement("h3", { className: "text-lg font-semibold text-gray-900 group-hover:text-primary-600 transition-colors" }, category.name),
11067
- category.productCount > 0 && /* @__PURE__ */ React19.createElement("p", { className: "mt-1 text-sm text-gray-500" }, category.productCount, " ", category.productCount === 1 ? "product" : "products")
11068
- ))) : /* @__PURE__ */ React19.createElement(
11163
+ ) : /* @__PURE__ */ React20.createElement("div", { className: "flex h-full w-full items-center justify-center bg-gray-100 text-gray-400" }, /* @__PURE__ */ React20.createElement(Package, { className: "h-12 w-12" }))),
11164
+ /* @__PURE__ */ React20.createElement("h3", { className: "text-lg font-semibold text-gray-900 group-hover:text-primary-600 transition-colors" }, category.name),
11165
+ category.productCount > 0 && /* @__PURE__ */ React20.createElement("p", { className: "mt-1 text-sm text-gray-500" }, category.productCount, " ", category.productCount === 1 ? "product" : "products")
11166
+ ))) : /* @__PURE__ */ React20.createElement(
11069
11167
  EmptyState,
11070
11168
  {
11071
11169
  title: "No categories found",
11072
11170
  description: "There are currently no product categories available.",
11073
11171
  icon: Package,
11074
11172
  actionLabel: "Shop products",
11075
- onAction: () => router.push("/shop")
11173
+ onAction: () => router.push(buildPath("/shop"))
11076
11174
  }
11077
11175
  )
11078
11176
  ))));
@@ -11224,14 +11322,15 @@ function Header() {
11224
11322
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
11225
11323
  const [isSearchOpen, setIsSearchOpen] = useState(false);
11226
11324
  const [searchQuery, setSearchQuery] = useState("");
11325
+ const { buildPath } = useBasePath();
11227
11326
  const navLinks = [
11228
- { href: "/shop", label: "Shop" },
11229
- { href: "/categories", label: "Categories" },
11230
- { href: "/orders", label: "Orders" },
11231
- { href: "/about", label: "About" },
11232
- { href: "/contact", label: "Contact" }
11327
+ { href: buildPath("/shop"), label: "Shop" },
11328
+ { href: buildPath("/categories"), label: "Categories" },
11329
+ { href: buildPath("/orders"), label: "Orders" },
11330
+ { href: buildPath("/about"), label: "About" },
11331
+ { href: buildPath("/contact"), label: "Contact" }
11233
11332
  ];
11234
- return /* @__PURE__ */ React19.createElement("header", { className: "sticky top-0 z-40 bg-white/80 backdrop-blur-xl border-b border-gray-200 shadow-sm" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between h-20" }, /* @__PURE__ */ React19.createElement(Link8, { href: "/", className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement("div", { className: "relative w-12 h-12" }, /* @__PURE__ */ React19.createElement(
11333
+ return /* @__PURE__ */ React20.createElement("header", { className: "sticky top-0 z-40 bg-white/80 backdrop-blur-xl border-b border-gray-200 shadow-sm" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between h-20" }, /* @__PURE__ */ React20.createElement(Link8, { href: buildPath("/"), className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement("div", { className: "relative w-12 h-12" }, /* @__PURE__ */ React20.createElement(
11235
11334
  Image3,
11236
11335
  {
11237
11336
  src: config.logo,
@@ -11239,7 +11338,7 @@ function Header() {
11239
11338
  fill: true,
11240
11339
  className: "object-contain"
11241
11340
  }
11242
- )), /* @__PURE__ */ React19.createElement("span", { className: "text-2xl font-bold text-gray-900 hidden sm:block" }, config.storeName)), /* @__PURE__ */ React19.createElement("nav", { className: "hidden lg:flex items-center gap-8" }, navLinks.map((link) => /* @__PURE__ */ React19.createElement(
11341
+ )), /* @__PURE__ */ React20.createElement("span", { className: "text-2xl font-bold text-gray-900 hidden sm:block" }, config.storeName)), /* @__PURE__ */ React20.createElement("nav", { className: "hidden lg:flex items-center gap-8" }, navLinks.map((link) => /* @__PURE__ */ React20.createElement(
11243
11342
  Link8,
11244
11343
  {
11245
11344
  key: link.href,
@@ -11247,16 +11346,16 @@ function Header() {
11247
11346
  className: "text-gray-700 hover:text-primary-600 font-medium transition-colors relative group"
11248
11347
  },
11249
11348
  link.label,
11250
- /* @__PURE__ */ React19.createElement("span", { className: "absolute bottom-0 left-0 w-0 h-0.5 bg-primary-600 group-hover:w-full transition-all duration-300" })
11251
- ))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React19.createElement("div", { className: "relative" }, /* @__PURE__ */ React19.createElement(
11349
+ /* @__PURE__ */ React20.createElement("span", { className: "absolute bottom-0 left-0 w-0 h-0.5 bg-primary-600 group-hover:w-full transition-all duration-300" })
11350
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "relative" }, /* @__PURE__ */ React20.createElement(
11252
11351
  "button",
11253
11352
  {
11254
11353
  onClick: () => setIsSearchOpen(!isSearchOpen),
11255
11354
  className: "p-2 hover:bg-gray-100 rounded-lg transition-colors",
11256
11355
  "aria-label": "Search"
11257
11356
  },
11258
- /* @__PURE__ */ React19.createElement(Search, { className: "w-5 h-5 text-gray-700" })
11259
- ), /* @__PURE__ */ React19.createElement(AnimatePresence, null, isSearchOpen && /* @__PURE__ */ React19.createElement(
11357
+ /* @__PURE__ */ React20.createElement(Search, { className: "w-5 h-5 text-gray-700" })
11358
+ ), /* @__PURE__ */ React20.createElement(AnimatePresence, null, isSearchOpen && /* @__PURE__ */ React20.createElement(
11260
11359
  motion.div,
11261
11360
  {
11262
11361
  initial: { opacity: 0, width: 0 },
@@ -11264,7 +11363,7 @@ function Header() {
11264
11363
  exit: { opacity: 0, width: 0 },
11265
11364
  className: "absolute right-0 top-full mt-2 bg-white rounded-lg shadow-lg overflow-hidden"
11266
11365
  },
11267
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center p-2 w-64" }, /* @__PURE__ */ React19.createElement(Search, { className: "w-5 h-5 text-gray-400 mr-2" }), /* @__PURE__ */ React19.createElement(
11366
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center p-2 w-64" }, /* @__PURE__ */ React20.createElement(Search, { className: "w-5 h-5 text-gray-400 mr-2" }), /* @__PURE__ */ React20.createElement(
11268
11367
  "input",
11269
11368
  {
11270
11369
  type: "text",
@@ -11272,43 +11371,43 @@ function Header() {
11272
11371
  onChange: (e) => setSearchQuery(e.target.value),
11273
11372
  onKeyDown: (e) => {
11274
11373
  if (e.key === "Enter" && searchQuery.trim()) {
11275
- window.location.href = `/search?q=${encodeURIComponent(searchQuery.trim())}`;
11374
+ window.location.href = buildPath(`/search?q=${encodeURIComponent(searchQuery.trim())}`);
11276
11375
  }
11277
11376
  },
11278
11377
  placeholder: "Search products...",
11279
11378
  className: "w-full outline-none text-gray-700",
11280
11379
  autoFocus: true
11281
11380
  }
11282
- ), searchQuery && /* @__PURE__ */ React19.createElement(
11381
+ ), searchQuery && /* @__PURE__ */ React20.createElement(
11283
11382
  "button",
11284
11383
  {
11285
11384
  onClick: () => setSearchQuery(""),
11286
11385
  className: "text-gray-400 hover:text-gray-600"
11287
11386
  },
11288
- /* @__PURE__ */ React19.createElement(X, { className: "w-4 h-4" })
11387
+ /* @__PURE__ */ React20.createElement(X, { className: "w-4 h-4" })
11289
11388
  ))
11290
- ))), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React19.createElement(Link8, { href: "/wishlist", className: "relative p-2 text-gray-700 hover:text-red-500 transition-colors" }, /* @__PURE__ */ React19.createElement(Heart, { className: "w-6 h-6" }), wishlistCount > 0 && /* @__PURE__ */ React19.createElement("span", { className: "absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center" }, wishlistCount)), /* @__PURE__ */ React19.createElement(Link8, { href: "/cart", className: "relative p-2 text-gray-700 hover:text-primary-600 transition-colors" }, /* @__PURE__ */ React19.createElement(ShoppingCart, { className: "w-6 h-6" }), cart?.cartBody?.items?.length && cart.cartBody?.items?.length > 0 ? /* @__PURE__ */ React19.createElement("span", { className: "absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center" }, cart.cartBody?.items?.length) : null), isAuthenticated ? /* @__PURE__ */ React19.createElement(
11389
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React20.createElement(Link8, { href: buildPath("/wishlist"), className: "relative p-2 text-gray-700 hover:text-red-500 transition-colors" }, /* @__PURE__ */ React20.createElement(Heart, { className: "w-6 h-6" }), wishlistCount > 0 && /* @__PURE__ */ React20.createElement("span", { className: "absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center" }, wishlistCount)), /* @__PURE__ */ React20.createElement(Link8, { href: buildPath("/cart"), className: "relative p-2 text-gray-700 hover:text-primary-600 transition-colors" }, /* @__PURE__ */ React20.createElement(ShoppingCart, { className: "w-6 h-6" }), cart?.cartBody?.items?.length && cart.cartBody?.items?.length > 0 ? /* @__PURE__ */ React20.createElement("span", { className: "absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center" }, cart.cartBody?.items?.length) : null), isAuthenticated ? /* @__PURE__ */ React20.createElement(
11291
11390
  Link8,
11292
11391
  {
11293
- href: "/account",
11392
+ href: buildPath("/account"),
11294
11393
  className: "p-2 hover:bg-gray-100 rounded-lg transition-colors"
11295
11394
  },
11296
- /* @__PURE__ */ React19.createElement(User, { className: "w-6 h-6 text-gray-700" })
11297
- ) : /* @__PURE__ */ React19.createElement(
11395
+ /* @__PURE__ */ React20.createElement(User, { className: "w-6 h-6 text-gray-700" })
11396
+ ) : /* @__PURE__ */ React20.createElement(
11298
11397
  Link8,
11299
11398
  {
11300
- href: "/login",
11399
+ href: buildPath("/login"),
11301
11400
  className: "hidden sm:block px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-medium"
11302
11401
  },
11303
11402
  "Sign In"
11304
- )), /* @__PURE__ */ React19.createElement(
11403
+ )), /* @__PURE__ */ React20.createElement(
11305
11404
  "button",
11306
11405
  {
11307
11406
  className: "lg:hidden p-2 hover:bg-gray-100 rounded-lg transition-colors",
11308
11407
  onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen)
11309
11408
  },
11310
- isMobileMenuOpen ? /* @__PURE__ */ React19.createElement(X, { className: "w-6 h-6" }) : /* @__PURE__ */ React19.createElement(Menu, { className: "w-6 h-6" })
11311
- )), /* @__PURE__ */ React19.createElement(AnimatePresence, null, isMobileMenuOpen && /* @__PURE__ */ React19.createElement(
11409
+ isMobileMenuOpen ? /* @__PURE__ */ React20.createElement(X, { className: "w-6 h-6" }) : /* @__PURE__ */ React20.createElement(Menu, { className: "w-6 h-6" })
11410
+ )), /* @__PURE__ */ React20.createElement(AnimatePresence, null, isMobileMenuOpen && /* @__PURE__ */ React20.createElement(
11312
11411
  motion.div,
11313
11412
  {
11314
11413
  initial: { opacity: 0, height: 0 },
@@ -11316,7 +11415,7 @@ function Header() {
11316
11415
  exit: { opacity: 0, height: 0 },
11317
11416
  className: "lg:hidden overflow-hidden border-t border-gray-200"
11318
11417
  },
11319
- /* @__PURE__ */ React19.createElement("nav", { className: "flex flex-col gap-1 py-2" }, navLinks.map((link) => /* @__PURE__ */ React19.createElement(
11418
+ /* @__PURE__ */ React20.createElement("nav", { className: "flex flex-col gap-1 py-2" }, navLinks.map((link) => /* @__PURE__ */ React20.createElement(
11320
11419
  Link8,
11321
11420
  {
11322
11421
  key: link.href,
@@ -11325,10 +11424,10 @@ function Header() {
11325
11424
  onClick: () => setIsMobileMenuOpen(false)
11326
11425
  },
11327
11426
  link.label
11328
- )), !isAuthenticated && /* @__PURE__ */ React19.createElement(
11427
+ )), !isAuthenticated && /* @__PURE__ */ React20.createElement(
11329
11428
  Link8,
11330
11429
  {
11331
- href: "/login",
11430
+ href: buildPath("/login"),
11332
11431
  onClick: () => setIsMobileMenuOpen(false),
11333
11432
  className: "px-4 py-3 text-primary-600 hover:bg-gray-50 rounded-lg font-medium"
11334
11433
  },
@@ -11338,70 +11437,77 @@ function Header() {
11338
11437
  }
11339
11438
  function Footer() {
11340
11439
  const { config } = useTheme();
11440
+ const { buildPath } = useBasePath();
11341
11441
  const footerLinks = {
11342
11442
  shop: [
11343
- { label: "All Products", href: "/shop" },
11344
- { label: "Categories", href: "/categories" },
11345
- { label: "Featured", href: "/featured" },
11346
- { label: "New Arrivals", href: "/new" }
11443
+ { label: "All Products", href: buildPath("/shop") },
11444
+ { label: "Categories", href: buildPath("/categories") },
11445
+ { label: "Featured", href: buildPath("/featured") },
11446
+ { label: "New Arrivals", href: buildPath("/new") }
11347
11447
  ],
11348
11448
  account: [
11349
- { label: "My Account", href: "/account" },
11350
- { label: "Orders", href: "/orders" },
11351
- { label: "Wishlist", href: "/wishlist" },
11352
- { label: "Cart", href: "/cart" }
11449
+ { label: "My Account", href: buildPath("/account") },
11450
+ { label: "Orders", href: buildPath("/orders") },
11451
+ { label: "Wishlist", href: buildPath("/wishlist") },
11452
+ { label: "Cart", href: buildPath("/cart") }
11353
11453
  ],
11354
11454
  support: [
11355
- { label: "Contact Us", href: "/contact" },
11356
- { label: "FAQs", href: "/faqs" },
11357
- { label: "Shipping Info", href: "/shipping" },
11358
- { label: "Returns", href: "/returns" }
11359
- ]};
11360
- return /* @__PURE__ */ React19.createElement("footer", { className: "bg-gray-900 text-gray-300" }, /* @__PURE__ */ React19.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12" }, /* @__PURE__ */ React19.createElement("div", { className: "lg:col-span-2" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-2xl font-bold text-white mb-4" }, config.storeName), /* @__PURE__ */ React19.createElement("p", { className: "text-gray-400 mb-6 max-w-md" }, "Your trusted online store for quality products. We deliver excellence with every order."), /* @__PURE__ */ React19.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(Mail, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "support@", config.storeName.toLowerCase().replace(/\s+/g, ""), ".com")), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(Phone, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "+1 (555) 123-4567")), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React19.createElement(MapPin, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React19.createElement("span", null, "123 Store Street, City, Country")))), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Shop"), /* @__PURE__ */ React19.createElement("ul", { className: "space-y-2" }, footerLinks.shop.map((link) => /* @__PURE__ */ React19.createElement("li", { key: link.href }, /* @__PURE__ */ React19.createElement(
11455
+ { label: "Contact Us", href: buildPath("/contact") },
11456
+ { label: "FAQs", href: buildPath("/faqs") },
11457
+ { label: "Shipping Info", href: buildPath("/shipping") },
11458
+ { label: "Returns", href: buildPath("/returns") }
11459
+ ],
11460
+ legal: [
11461
+ { label: "Privacy Policy", href: buildPath("/privacy") },
11462
+ { label: "Terms of Service", href: buildPath("/terms") },
11463
+ { label: "Cookie Policy", href: buildPath("/cookies") }
11464
+ ]
11465
+ };
11466
+ return /* @__PURE__ */ React20.createElement("footer", { className: "bg-gray-900 text-gray-300" }, /* @__PURE__ */ React20.createElement("div", { className: "container mx-auto px-4 py-16" }, /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12" }, /* @__PURE__ */ React20.createElement("div", { className: "lg:col-span-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-2xl font-bold text-white mb-4" }, config.storeName), /* @__PURE__ */ React20.createElement("p", { className: "text-gray-400 mb-6 max-w-md" }, "Your trusted online store for quality products. We deliver excellence with every order."), /* @__PURE__ */ React20.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(Mail, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "support@", config.storeName.toLowerCase().replace(/\s+/g, ""), ".com")), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(Phone, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "+1 (555) 123-4567")), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React20.createElement(MapPin, { className: "w-5 h-5 text-primary-500" }), /* @__PURE__ */ React20.createElement("span", null, "123 Store Street, City, Country")))), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Shop"), /* @__PURE__ */ React20.createElement("ul", { className: "space-y-2" }, footerLinks.shop.map((link) => /* @__PURE__ */ React20.createElement("li", { key: link.href }, /* @__PURE__ */ React20.createElement(
11361
11467
  Link8,
11362
11468
  {
11363
11469
  href: link.href,
11364
11470
  className: "hover:text-primary-500 transition-colors"
11365
11471
  },
11366
11472
  link.label
11367
- ))))), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Account"), /* @__PURE__ */ React19.createElement("ul", { className: "space-y-2" }, footerLinks.account.map((link) => /* @__PURE__ */ React19.createElement("li", { key: link.href }, /* @__PURE__ */ React19.createElement(
11473
+ ))))), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Account"), /* @__PURE__ */ React20.createElement("ul", { className: "space-y-2" }, footerLinks.account.map((link) => /* @__PURE__ */ React20.createElement("li", { key: link.href }, /* @__PURE__ */ React20.createElement(
11368
11474
  Link8,
11369
11475
  {
11370
11476
  href: link.href,
11371
11477
  className: "hover:text-primary-500 transition-colors"
11372
11478
  },
11373
11479
  link.label
11374
- ))))), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Support"), /* @__PURE__ */ React19.createElement("ul", { className: "space-y-2" }, footerLinks.support.map((link) => /* @__PURE__ */ React19.createElement("li", { key: link.href }, /* @__PURE__ */ React19.createElement(
11480
+ ))))), /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("h4", { className: "text-lg font-semibold text-white mb-4" }, "Support"), /* @__PURE__ */ React20.createElement("ul", { className: "space-y-2" }, footerLinks.support.map((link) => /* @__PURE__ */ React20.createElement("li", { key: link.href }, /* @__PURE__ */ React20.createElement(
11375
11481
  Link8,
11376
11482
  {
11377
11483
  href: link.href,
11378
11484
  className: "hover:text-primary-500 transition-colors"
11379
11485
  },
11380
11486
  link.label
11381
- )))))), /* @__PURE__ */ React19.createElement("div", { className: "border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center gap-4" }, /* @__PURE__ */ React19.createElement("p", { className: "text-gray-400 text-sm" }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", config.storeName, ". All rights reserved."), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React19.createElement(
11487
+ )))))), /* @__PURE__ */ React20.createElement("div", { className: "border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center gap-4" }, /* @__PURE__ */ React20.createElement("p", { className: "text-gray-400 text-sm" }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", config.storeName, ". All rights reserved."), /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React20.createElement(
11382
11488
  "a",
11383
11489
  {
11384
11490
  href: "#",
11385
11491
  className: "w-10 h-10 bg-gray-800 hover:bg-primary-600 rounded-full flex items-center justify-center transition-colors"
11386
11492
  },
11387
- /* @__PURE__ */ React19.createElement(Facebook, { className: "w-5 h-5" })
11388
- ), /* @__PURE__ */ React19.createElement(
11493
+ /* @__PURE__ */ React20.createElement(Facebook, { className: "w-5 h-5" })
11494
+ ), /* @__PURE__ */ React20.createElement(
11389
11495
  "a",
11390
11496
  {
11391
11497
  href: "#",
11392
11498
  className: "w-10 h-10 bg-gray-800 hover:bg-primary-600 rounded-full flex items-center justify-center transition-colors"
11393
11499
  },
11394
- /* @__PURE__ */ React19.createElement(Twitter, { className: "w-5 h-5" })
11395
- ), /* @__PURE__ */ React19.createElement(
11500
+ /* @__PURE__ */ React20.createElement(Twitter, { className: "w-5 h-5" })
11501
+ ), /* @__PURE__ */ React20.createElement(
11396
11502
  "a",
11397
11503
  {
11398
11504
  href: "#",
11399
11505
  className: "w-10 h-10 bg-gray-800 hover:bg-primary-600 rounded-full flex items-center justify-center transition-colors"
11400
11506
  },
11401
- /* @__PURE__ */ React19.createElement(Instagram, { className: "w-5 h-5" })
11507
+ /* @__PURE__ */ React20.createElement(Instagram, { className: "w-5 h-5" })
11402
11508
  )))));
11403
11509
  }
11404
11510
 
11405
- export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, CategoriesScreen, CheckoutScreen, CurrentOrdersScreen, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, NewAddressPage as NewAddressScreen, OrderCard, OrderCardSkeleton, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, ProfileScreen, RegisterScreen, SearchPage as SearchResultsScreen, ShopScreen, Skeleton, ThemeProvider, WishlistProvider, WishlistScreen, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme, useWishlist };
11511
+ export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, CategoriesScreen, CheckoutScreen, CurrentOrdersScreen, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, NewAddressPage as NewAddressScreen, OrderCard, OrderCardSkeleton, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, ProfileScreen, RegisterScreen, SearchPage as SearchResultsScreen, ShopScreen, Skeleton, ThemeProvider, WishlistProvider, WishlistScreen, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useBasePath, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme, useWishlist };
11406
11512
  //# sourceMappingURL=index.mjs.map
11407
11513
  //# sourceMappingURL=index.mjs.map