@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.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.
Files changed (77) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
  4. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
  33. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
  35. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  41. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  52. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  54. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
  63. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  69. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
  71. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -2,49 +2,49 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useProviders as i } from "../../hooks/useKadaikodiApi.js";
6
- import { useEffect as a, useMemo as o, useState as s } from "react";
7
- import { AlertCircle as c, Bell as l, CheckCircle2 as u, Clock as d, Link2 as f, MapPin as p, Phone as m, Save as h, Shield as g, Store as _ } from "lucide-react";
8
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { EmphasisPanel as x, NextSteps as S, PagePurpose as ee } from "@burdenoff/fe-libs/ui";
5
+ import { useProviders as i, useUpdateProvider as a } from "../../hooks/useKadaikodiApi.js";
6
+ import { useEffect as o, useMemo as s, useState as c } from "react";
7
+ import { AlertCircle as l, Bell as u, CheckCircle2 as d, Clock as f, Link2 as p, MapPin as m, Phone as h, Save as g, Shield as _, Store as v } from "lucide-react";
8
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
9
+ import { EmphasisPanel as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/kadaikodi/pages/cart-owner/BusinessSettingsPage.tsx
11
- var C = [
11
+ var T = [
12
12
  {
13
13
  id: "general",
14
14
  label: "General",
15
- icon: _
15
+ icon: v
16
16
  },
17
17
  {
18
18
  id: "contact",
19
19
  label: "Contact",
20
- icon: m
20
+ icon: h
21
21
  },
22
22
  {
23
23
  id: "location",
24
24
  label: "Location",
25
- icon: p
25
+ icon: m
26
26
  },
27
27
  {
28
28
  id: "operating",
29
29
  label: "Operating",
30
- icon: d
30
+ icon: f
31
31
  },
32
32
  {
33
33
  id: "policies",
34
34
  label: "Policies",
35
- icon: g
35
+ icon: _
36
36
  },
37
37
  {
38
38
  id: "notifications",
39
39
  label: "Notifications",
40
- icon: l
40
+ icon: u
41
41
  },
42
42
  {
43
43
  id: "integration",
44
44
  label: "Integrations",
45
- icon: f
45
+ icon: p
46
46
  }
47
- ], w = [
47
+ ], E = [
48
48
  "Food & Beverage",
49
49
  "Personal Care & Beauty",
50
50
  "Repair & Maintenance",
@@ -54,58 +54,61 @@ var C = [
54
54
  "Education & Skills",
55
55
  "Retail & Merchandise",
56
56
  "Grocery & Essentials"
57
- ], T = ({ label: e, value: t, onChange: n, type: r = "text", options: i, placeholder: a, hint: o, rows: s = 3 }) => {
58
- let c = e.toLowerCase().replace(/\s+/g, "-");
59
- return /* @__PURE__ */ b("div", { children: [
60
- /* @__PURE__ */ y("label", {
61
- htmlFor: c,
57
+ ], D = ({ label: e, value: n, onChange: r, type: i = "text", options: a, placeholder: o, hint: s, rows: c = 3, disabled: l = !1 }) => {
58
+ let u = e.toLowerCase().replace(/\s+/g, "-");
59
+ return /* @__PURE__ */ x("div", { children: [
60
+ /* @__PURE__ */ b("label", {
61
+ htmlFor: u,
62
62
  className: "block text-sm font-medium text-text-primary mb-1.5",
63
63
  children: e
64
64
  }),
65
- r === "textarea" ? /* @__PURE__ */ y("textarea", {
66
- id: c,
67
- value: t,
68
- onChange: (e) => n(e.target.value),
69
- rows: s,
70
- placeholder: a,
71
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
72
- }) : r === "select" ? /* @__PURE__ */ y("select", {
73
- id: c,
74
- value: t,
75
- onChange: (e) => n(e.target.value),
76
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
77
- children: i?.map((e) => /* @__PURE__ */ y("option", {
65
+ i === "textarea" ? /* @__PURE__ */ b("textarea", {
66
+ id: u,
67
+ value: n,
68
+ onChange: (e) => r(e.target.value),
69
+ rows: c,
70
+ placeholder: o,
71
+ disabled: l,
72
+ className: t("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none", l && "bg-bg-sunken/50 cursor-not-allowed")
73
+ }) : i === "select" ? /* @__PURE__ */ b("select", {
74
+ id: u,
75
+ value: n,
76
+ onChange: (e) => r(e.target.value),
77
+ disabled: l,
78
+ className: t("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", l && "bg-bg-sunken/50 cursor-not-allowed"),
79
+ children: a?.map((e) => /* @__PURE__ */ b("option", {
78
80
  value: e,
79
81
  children: e
80
82
  }, e))
81
- }) : /* @__PURE__ */ y("input", {
82
- id: c,
83
- type: r,
84
- value: t,
85
- onChange: (e) => n(e.target.value),
86
- placeholder: a,
87
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
83
+ }) : /* @__PURE__ */ b("input", {
84
+ id: u,
85
+ type: i,
86
+ value: n,
87
+ onChange: (e) => r(e.target.value),
88
+ placeholder: o,
89
+ disabled: l,
90
+ className: t("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", l && "bg-bg-sunken/50 cursor-not-allowed")
88
91
  }),
89
- o && /* @__PURE__ */ y("p", {
92
+ s && /* @__PURE__ */ b("p", {
90
93
  className: "mt-1 text-xs text-text-secondary",
91
- children: o
94
+ children: s
92
95
  })
93
96
  ] });
94
- }, E = ({ label: e, description: n, checked: r, onChange: i }) => /* @__PURE__ */ b("div", {
97
+ }, O = ({ label: e, description: n, checked: r, onChange: i }) => /* @__PURE__ */ x("div", {
95
98
  className: "flex items-center justify-between py-3",
96
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
99
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
97
100
  className: "text-sm font-medium text-text-primary",
98
101
  children: e
99
- }), n && /* @__PURE__ */ y("p", {
102
+ }), n && /* @__PURE__ */ b("p", {
100
103
  className: "text-xs text-text-secondary mt-0.5",
101
104
  children: n
102
- })] }), /* @__PURE__ */ y("button", {
105
+ })] }), /* @__PURE__ */ b("button", {
103
106
  type: "button",
104
107
  onClick: () => i(!r),
105
108
  className: t("h-6 w-11 rounded-full transition-colors relative", r ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
106
- children: /* @__PURE__ */ y("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", r ? "translate-x-5" : "translate-x-0.5") })
109
+ children: /* @__PURE__ */ b("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", r ? "translate-x-5" : "translate-x-0.5") })
107
110
  })]
108
- }), D = {
111
+ }), ee = {
109
112
  FOOD_BEVERAGE: "Food & Beverage",
110
113
  PERSONAL_CARE_BEAUTY: "Personal Care & Beauty",
111
114
  CLOTHING_FASHION: "Clothing & Fashion",
@@ -115,8 +118,8 @@ var C = [
115
118
  EDUCATION_SKILLS: "Education & Skills",
116
119
  RETAIL_MERCHANDISE: "Retail & Merchandise",
117
120
  GROCERY_ESSENTIALS: "Grocery & Essentials"
118
- }, O = () => {
119
- let { navigateTo: l, currentUser: d } = e(), [f, p] = s("general"), [m, g] = s(!1), [_, O] = s(!1), { data: k = [], isLoading: A } = i(), j = o(() => k.find((e) => e.ownerId === d?.id) ?? k[0], [k, d?.id]), [M, N] = s({
121
+ }, k = () => {
122
+ let { navigateTo: u, currentUser: f } = e(), [p, m] = c("general"), h = a(), _ = h.isPending, [v, k] = c(!1), [te, A] = c(!1), { data: j = [], isLoading: M } = i(), N = s(() => j.find((e) => e.ownerId === f?.id) ?? j[0], [j, f?.id]), [P, F] = c({
120
123
  businessName: "",
121
124
  description: "",
122
125
  category: "Food & Beverage",
@@ -124,7 +127,7 @@ var C = [
124
127
  panNumber: "",
125
128
  fssaiLicense: "",
126
129
  establishedYear: ""
127
- }), [P, te] = s({
130
+ }), [I, L] = c({
128
131
  phone: "",
129
132
  email: "",
130
133
  website: "",
@@ -132,7 +135,7 @@ var C = [
132
135
  instagram: "",
133
136
  twitter: "",
134
137
  facebook: ""
135
- }), [F, I] = s({
138
+ }), [R, z] = c({
136
139
  address: "",
137
140
  city: "",
138
141
  state: "",
@@ -142,17 +145,17 @@ var C = [
142
145
  deliveryRadius: 5,
143
146
  deliveryCharge: 30,
144
147
  freeDeliveryAbove: 300
145
- }), [L, R] = s({
148
+ }), [B, V] = c({
146
149
  autoAcceptOrders: !0,
147
150
  preparationTime: 15,
148
151
  maxConcurrentOrders: 10,
149
152
  advanceBookingDays: 3
150
- }), [z, B] = s({
153
+ }), [H, U] = c({
151
154
  returnPolicy: "",
152
155
  cancellationPolicy: "",
153
156
  privacyPolicy: "",
154
157
  termsOfService: ""
155
- }), [V, H] = s({
158
+ }), [W, ne] = c({
156
159
  newOrderEmail: !0,
157
160
  newOrderSms: !0,
158
161
  newOrderPush: !0,
@@ -163,75 +166,96 @@ var C = [
163
166
  lowStockAlert: !0,
164
167
  reviewNotification: !0,
165
168
  marketingEmails: !1
166
- }), [U, W] = s({
169
+ }), [G, re] = c({
167
170
  paymentGateway: "razorpay",
168
171
  paymentGatewayKey: "",
169
172
  smsProvider: "twilio",
170
173
  smsApiKey: "",
171
174
  analyticsId: ""
172
- }), [G, K] = s(!1);
173
- a(() => {
174
- if (!j || G) return;
175
- let e = D[j.category] ?? j.category;
176
- N((t) => ({
175
+ }), [K, ie] = c(!1);
176
+ o(() => {
177
+ if (!N || K) return;
178
+ let e = ee[N.category] ?? N.category;
179
+ F((t) => ({
177
180
  ...t,
178
- businessName: j.name,
179
- category: w.includes(e) ? e : t.category
181
+ businessName: N.name,
182
+ category: E.includes(e) ? e : t.category
180
183
  }));
181
- let t = j.location?.coordinates;
182
- I((e) => ({
184
+ let t = N.location?.coordinates;
185
+ z((e) => ({
183
186
  ...e,
184
- address: j.location?.address ?? "",
187
+ address: N.location?.address ?? "",
185
188
  latitude: t?.lat ? String(t.lat) : "",
186
189
  longitude: t?.lng ? String(t.lng) : ""
187
- })), K(!0);
188
- }, [j, G]);
190
+ })), ie(!0);
191
+ }, [N, K]);
189
192
  let q = () => {
190
- g(!0), setTimeout(() => {
191
- g(!1), O(!0), setTimeout(() => O(!1), 3e3);
192
- }, 1e3);
193
- }, J = (e) => (t) => N((n) => ({
193
+ if (!N) return;
194
+ A(!1);
195
+ let e = parseFloat(R.latitude), t = parseFloat(R.longitude), n = {
196
+ name: P.businessName,
197
+ description: P.description || void 0,
198
+ location: {
199
+ address: R.address,
200
+ latitude: Number.isFinite(e) ? e : void 0,
201
+ longitude: Number.isFinite(t) ? t : void 0,
202
+ coordinates: {
203
+ lat: Number.isFinite(e) ? e : 0,
204
+ lng: Number.isFinite(t) ? t : 0
205
+ }
206
+ }
207
+ };
208
+ h.mutate({
209
+ id: N.id,
210
+ input: n
211
+ }, {
212
+ onSuccess: () => {
213
+ k(!0), setTimeout(() => k(!1), 3e3);
214
+ },
215
+ onError: () => A(!0)
216
+ });
217
+ }, J = (e) => (t) => F((n) => ({
194
218
  ...n,
195
219
  [e]: t
196
- })), Y = (e) => (t) => te((n) => ({
220
+ })), Y = (e) => (t) => L((n) => ({
197
221
  ...n,
198
222
  [e]: t
199
- })), X = (e) => (t) => I((n) => ({
223
+ })), X = (e) => (t) => z((n) => ({
200
224
  ...n,
201
225
  [e]: e === "deliveryRadius" || e === "deliveryCharge" || e === "freeDeliveryAbove" ? parseInt(t) || 0 : t
202
- })), Z = (e) => (t) => B((n) => ({
226
+ })), Z = (e) => (t) => U((n) => ({
203
227
  ...n,
204
228
  [e]: t
205
- })), Q = (e) => (t) => H((n) => ({
229
+ })), Q = (e) => (t) => ne((n) => ({
206
230
  ...n,
207
231
  [e]: t
208
- })), $ = (e) => (t) => W((n) => ({
232
+ })), $ = (e) => (t) => re((n) => ({
209
233
  ...n,
210
234
  [e]: t
211
235
  }));
212
- return A ? /* @__PURE__ */ y(n, {
236
+ return M ? /* @__PURE__ */ b(n, {
213
237
  title: "Business Settings",
214
238
  description: "Manage your business profile and configuration",
215
- children: /* @__PURE__ */ y("div", {
239
+ children: /* @__PURE__ */ b("div", {
216
240
  className: "flex items-center justify-center py-24",
217
- children: /* @__PURE__ */ y("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
241
+ children: /* @__PURE__ */ b("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
218
242
  })
219
- }) : j ? /* @__PURE__ */ b(n, {
243
+ }) : N ? /* @__PURE__ */ x(n, {
220
244
  title: "Business Settings",
221
245
  description: "Manage your business profile and configuration",
222
- actions: /* @__PURE__ */ y("button", {
246
+ actions: /* @__PURE__ */ b("button", {
223
247
  type: "button",
224
248
  onClick: q,
225
- disabled: m,
226
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", _ ? "bg-status-success-bg-subtle text-status-success-text" : m ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
227
- children: m ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : _ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), "Save Settings"] })
249
+ disabled: _,
250
+ className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", v ? "bg-status-success-bg-subtle text-status-success-text" : _ ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
251
+ children: _ ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : v ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Save Settings"] })
228
252
  }),
229
253
  children: [
230
- /* @__PURE__ */ y(ee, {
254
+ /* @__PURE__ */ b(w, {
231
255
  className: "mb-6",
232
256
  children: "Your business's public identity and ground rules. Use this page to set your business name and branding, contact details and location, operating hours, and the policies (refunds, delivery radius, taxes) customers agree to — plus the alerts you receive and any integrations you connect. These details shape how customers find and trust your cart."
233
257
  }),
234
- /* @__PURE__ */ y(S, {
258
+ /* @__PURE__ */ b(C, {
235
259
  storageKey: "kadaikodi-owner-business-settings",
236
260
  className: "mb-6",
237
261
  steps: [
@@ -239,45 +263,52 @@ var C = [
239
263
  id: "location",
240
264
  label: "Confirm your location & hours",
241
265
  description: "So customers know where and when to find you.",
242
- onClick: () => p("location")
266
+ onClick: () => m("location")
243
267
  },
244
268
  {
245
269
  id: "policies",
246
270
  label: "Set your policies",
247
271
  description: "Refunds, delivery radius and taxes.",
248
- onClick: () => p("policies")
272
+ onClick: () => m("policies")
249
273
  },
250
274
  {
251
275
  id: "config",
252
276
  label: "Configure your service types",
253
277
  description: "Pickup, delivery and scheduled stops.",
254
- onClick: () => l("/cart-owner/service-config")
278
+ onClick: () => u("/cart-owner/service-config")
255
279
  }
256
280
  ]
257
281
  }),
258
- /* @__PURE__ */ b("div", {
282
+ /* @__PURE__ */ x("div", {
259
283
  className: "mb-6 flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
260
- children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ y("p", {
284
+ children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
261
285
  className: "text-xs text-text-secondary",
262
- children: "Business name, category and location are loaded from your cart. Other fields are saved in this browser for now — full profile sync to your provider record is coming soon."
286
+ children: "Business name, description and location save to your cart record. Category is fixed at cart creation. Contact, policy, notification and integration settings are kept in this browser for now."
287
+ })]
288
+ }),
289
+ te && /* @__PURE__ */ x("div", {
290
+ className: "mb-6 flex items-start gap-3 rounded-md border border-status-error-text/30 bg-status-error-bg-subtle p-3",
291
+ children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
292
+ className: "text-xs text-status-error-text",
293
+ children: "We couldn't save your changes just now. Please check your connection and try again."
263
294
  })]
264
295
  }),
265
- /* @__PURE__ */ b("div", {
296
+ /* @__PURE__ */ x("div", {
266
297
  className: "flex flex-col lg:flex-row gap-6",
267
298
  children: [
268
- /* @__PURE__ */ y("div", {
299
+ /* @__PURE__ */ b("div", {
269
300
  className: "lg:hidden",
270
- children: /* @__PURE__ */ y("div", {
301
+ children: /* @__PURE__ */ b("div", {
271
302
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3 shadow-sm",
272
- children: /* @__PURE__ */ y("div", {
303
+ children: /* @__PURE__ */ b("div", {
273
304
  className: "grid grid-cols-4 gap-2",
274
- children: C.map((e) => {
305
+ children: T.map((e) => {
275
306
  let n = e.icon;
276
- return /* @__PURE__ */ b("button", {
307
+ return /* @__PURE__ */ x("button", {
277
308
  type: "button",
278
- onClick: () => p(e.id),
279
- className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors", f === e.id ? "bg-accent text-text-primary" : "text-text-secondary hover:bg-bg-sunken"),
280
- children: [/* @__PURE__ */ y(n, { className: "h-4 w-4" }), /* @__PURE__ */ y("span", {
309
+ onClick: () => m(e.id),
310
+ className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors", p === e.id ? "bg-accent text-text-primary" : "text-text-secondary hover:bg-bg-sunken"),
311
+ children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), /* @__PURE__ */ b("span", {
281
312
  className: "hidden sm:inline",
282
313
  children: e.label
283
314
  })]
@@ -286,88 +317,90 @@ var C = [
286
317
  })
287
318
  })
288
319
  }),
289
- /* @__PURE__ */ y("div", {
320
+ /* @__PURE__ */ b("div", {
290
321
  className: "hidden lg:block lg:w-56 shrink-0",
291
- children: /* @__PURE__ */ b("div", {
322
+ children: /* @__PURE__ */ x("div", {
292
323
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm sticky top-24",
293
- children: [/* @__PURE__ */ y("div", {
324
+ children: [/* @__PURE__ */ b("div", {
294
325
  className: "p-4 border-b border-border-subtle",
295
- children: /* @__PURE__ */ y("h2", {
326
+ children: /* @__PURE__ */ b("h2", {
296
327
  className: "font-semibold text-text-primary text-sm",
297
328
  children: "Settings"
298
329
  })
299
- }), /* @__PURE__ */ y("nav", {
330
+ }), /* @__PURE__ */ b("nav", {
300
331
  className: "p-2",
301
- children: C.map((e) => {
332
+ children: T.map((e) => {
302
333
  let n = e.icon;
303
- return /* @__PURE__ */ b("button", {
334
+ return /* @__PURE__ */ x("button", {
304
335
  type: "button",
305
- onClick: () => p(e.id),
306
- className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors", f === e.id ? "bg-accent text-text-primary font-medium" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
307
- children: [/* @__PURE__ */ y(n, { className: "h-4 w-4" }), e.label]
336
+ onClick: () => m(e.id),
337
+ className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors", p === e.id ? "bg-accent text-text-primary font-medium" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
338
+ children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), e.label]
308
339
  }, e.id);
309
340
  })
310
341
  })]
311
342
  })
312
343
  }),
313
- /* @__PURE__ */ y("div", {
344
+ /* @__PURE__ */ b("div", {
314
345
  className: "flex-1 min-w-0",
315
- children: /* @__PURE__ */ b(x, {
346
+ children: /* @__PURE__ */ x(S, {
316
347
  className: "p-5 sm:p-6",
317
348
  children: [
318
- f === "general" && /* @__PURE__ */ b("div", {
349
+ p === "general" && /* @__PURE__ */ x("div", {
319
350
  className: "space-y-5",
320
351
  children: [
321
- /* @__PURE__ */ y(T, {
352
+ /* @__PURE__ */ b(D, {
322
353
  label: "Business Name",
323
- value: M.businessName,
354
+ value: P.businessName,
324
355
  onChange: J("businessName")
325
356
  }),
326
- /* @__PURE__ */ y(T, {
357
+ /* @__PURE__ */ b(D, {
327
358
  label: "Description",
328
- value: M.description,
359
+ value: P.description,
329
360
  onChange: J("description"),
330
361
  type: "textarea"
331
362
  }),
332
- /* @__PURE__ */ b("div", {
363
+ /* @__PURE__ */ x("div", {
333
364
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
334
- children: [/* @__PURE__ */ y(T, {
365
+ children: [/* @__PURE__ */ b(D, {
335
366
  label: "Category",
336
- value: M.category,
367
+ value: P.category,
337
368
  onChange: J("category"),
338
369
  type: "select",
339
- options: w
340
- }), /* @__PURE__ */ y(T, {
370
+ options: E,
371
+ disabled: !0,
372
+ hint: "Set when your cart was created and can't be changed here."
373
+ }), /* @__PURE__ */ b(D, {
341
374
  label: "Established Year",
342
- value: M.establishedYear,
375
+ value: P.establishedYear,
343
376
  onChange: J("establishedYear")
344
377
  })]
345
378
  }),
346
- /* @__PURE__ */ b("div", {
379
+ /* @__PURE__ */ x("div", {
347
380
  className: "flex items-start gap-3 rounded-md bg-[var(--color-accent-soft)] border border-border-focus/20 p-3",
348
- children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-text-primary shrink-0 mt-0.5" }), /* @__PURE__ */ y("p", {
381
+ children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-text-primary shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
349
382
  className: "text-xs text-text-primary",
350
383
  children: "GST, PAN, and FSSAI details are used for invoicing and compliance. Changes require verification."
351
384
  })]
352
385
  }),
353
- /* @__PURE__ */ b("div", {
386
+ /* @__PURE__ */ x("div", {
354
387
  className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
355
388
  children: [
356
- /* @__PURE__ */ y(T, {
389
+ /* @__PURE__ */ b(D, {
357
390
  label: "GST Number",
358
- value: M.gstNumber,
391
+ value: P.gstNumber,
359
392
  onChange: J("gstNumber"),
360
393
  hint: "15-digit GST ID"
361
394
  }),
362
- /* @__PURE__ */ y(T, {
395
+ /* @__PURE__ */ b(D, {
363
396
  label: "PAN Number",
364
- value: M.panNumber,
397
+ value: P.panNumber,
365
398
  onChange: J("panNumber"),
366
399
  hint: "10-digit PAN"
367
400
  }),
368
- /* @__PURE__ */ y(T, {
401
+ /* @__PURE__ */ b(D, {
369
402
  label: "FSSAI License",
370
- value: M.fssaiLicense,
403
+ value: P.fssaiLicense,
371
404
  onChange: J("fssaiLicense"),
372
405
  hint: "FSSAI license number"
373
406
  })
@@ -375,60 +408,60 @@ var C = [
375
408
  })
376
409
  ]
377
410
  }),
378
- f === "contact" && /* @__PURE__ */ b("div", {
411
+ p === "contact" && /* @__PURE__ */ x("div", {
379
412
  className: "space-y-5",
380
413
  children: [
381
- /* @__PURE__ */ b("div", {
414
+ /* @__PURE__ */ x("div", {
382
415
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
383
- children: [/* @__PURE__ */ y(T, {
416
+ children: [/* @__PURE__ */ b(D, {
384
417
  label: "Phone",
385
- value: P.phone,
418
+ value: I.phone,
386
419
  onChange: Y("phone"),
387
420
  type: "tel"
388
- }), /* @__PURE__ */ y(T, {
421
+ }), /* @__PURE__ */ b(D, {
389
422
  label: "Email",
390
- value: P.email,
423
+ value: I.email,
391
424
  onChange: Y("email"),
392
425
  type: "email"
393
426
  })]
394
427
  }),
395
- /* @__PURE__ */ b("div", {
428
+ /* @__PURE__ */ x("div", {
396
429
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
397
- children: [/* @__PURE__ */ y(T, {
430
+ children: [/* @__PURE__ */ b(D, {
398
431
  label: "Website",
399
- value: P.website,
432
+ value: I.website,
400
433
  onChange: Y("website"),
401
434
  type: "url",
402
435
  placeholder: "https://"
403
- }), /* @__PURE__ */ y(T, {
436
+ }), /* @__PURE__ */ b(D, {
404
437
  label: "WhatsApp",
405
- value: P.whatsapp,
438
+ value: I.whatsapp,
406
439
  onChange: Y("whatsapp"),
407
440
  type: "tel"
408
441
  })]
409
442
  }),
410
- /* @__PURE__ */ y("h3", {
443
+ /* @__PURE__ */ b("h3", {
411
444
  className: "text-sm font-semibold text-text-primary pt-2",
412
445
  children: "Social Media"
413
446
  }),
414
- /* @__PURE__ */ b("div", {
447
+ /* @__PURE__ */ x("div", {
415
448
  className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
416
449
  children: [
417
- /* @__PURE__ */ y(T, {
450
+ /* @__PURE__ */ b(D, {
418
451
  label: "Instagram",
419
- value: P.instagram,
452
+ value: I.instagram,
420
453
  onChange: Y("instagram"),
421
454
  placeholder: "@handle"
422
455
  }),
423
- /* @__PURE__ */ y(T, {
456
+ /* @__PURE__ */ b(D, {
424
457
  label: "Twitter / X",
425
- value: P.twitter,
458
+ value: I.twitter,
426
459
  onChange: Y("twitter"),
427
460
  placeholder: "@handle"
428
461
  }),
429
- /* @__PURE__ */ y(T, {
462
+ /* @__PURE__ */ b(D, {
430
463
  label: "Facebook",
431
- value: P.facebook,
464
+ value: I.facebook,
432
465
  onChange: Y("facebook"),
433
466
  placeholder: "Page name"
434
467
  })
@@ -436,72 +469,72 @@ var C = [
436
469
  })
437
470
  ]
438
471
  }),
439
- f === "location" && /* @__PURE__ */ b("div", {
472
+ p === "location" && /* @__PURE__ */ x("div", {
440
473
  className: "space-y-5",
441
474
  children: [
442
- /* @__PURE__ */ y(T, {
475
+ /* @__PURE__ */ b(D, {
443
476
  label: "Address",
444
- value: F.address,
477
+ value: R.address,
445
478
  onChange: X("address"),
446
479
  type: "textarea",
447
480
  rows: 2
448
481
  }),
449
- /* @__PURE__ */ b("div", {
482
+ /* @__PURE__ */ x("div", {
450
483
  className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
451
484
  children: [
452
- /* @__PURE__ */ y(T, {
485
+ /* @__PURE__ */ b(D, {
453
486
  label: "City",
454
- value: F.city,
487
+ value: R.city,
455
488
  onChange: X("city")
456
489
  }),
457
- /* @__PURE__ */ y(T, {
490
+ /* @__PURE__ */ b(D, {
458
491
  label: "State",
459
- value: F.state,
492
+ value: R.state,
460
493
  onChange: X("state")
461
494
  }),
462
- /* @__PURE__ */ y(T, {
495
+ /* @__PURE__ */ b(D, {
463
496
  label: "Pincode",
464
- value: F.pincode,
497
+ value: R.pincode,
465
498
  onChange: X("pincode")
466
499
  })
467
500
  ]
468
501
  }),
469
- /* @__PURE__ */ b("div", {
502
+ /* @__PURE__ */ x("div", {
470
503
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
471
- children: [/* @__PURE__ */ y(T, {
504
+ children: [/* @__PURE__ */ b(D, {
472
505
  label: "Latitude",
473
- value: F.latitude,
506
+ value: R.latitude,
474
507
  onChange: X("latitude"),
475
508
  hint: "e.g., 12.9352"
476
- }), /* @__PURE__ */ y(T, {
509
+ }), /* @__PURE__ */ b(D, {
477
510
  label: "Longitude",
478
- value: F.longitude,
511
+ value: R.longitude,
479
512
  onChange: X("longitude"),
480
513
  hint: "e.g., 77.6245"
481
514
  })]
482
515
  }),
483
- /* @__PURE__ */ y("h3", {
516
+ /* @__PURE__ */ b("h3", {
484
517
  className: "text-sm font-semibold text-text-primary pt-2",
485
518
  children: "Delivery Settings"
486
519
  }),
487
- /* @__PURE__ */ b("div", {
520
+ /* @__PURE__ */ x("div", {
488
521
  className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
489
522
  children: [
490
- /* @__PURE__ */ y(T, {
523
+ /* @__PURE__ */ b(D, {
491
524
  label: "Delivery Radius (km)",
492
- value: F.deliveryRadius,
525
+ value: R.deliveryRadius,
493
526
  onChange: X("deliveryRadius"),
494
527
  type: "number"
495
528
  }),
496
- /* @__PURE__ */ y(T, {
529
+ /* @__PURE__ */ b(D, {
497
530
  label: "Delivery Charge (₹)",
498
- value: F.deliveryCharge,
531
+ value: R.deliveryCharge,
499
532
  onChange: X("deliveryCharge"),
500
533
  type: "number"
501
534
  }),
502
- /* @__PURE__ */ y(T, {
535
+ /* @__PURE__ */ b(D, {
503
536
  label: "Free Delivery Above (₹)",
504
- value: F.freeDeliveryAbove,
537
+ value: R.freeDeliveryAbove,
505
538
  onChange: X("freeDeliveryAbove"),
506
539
  type: "number"
507
540
  })
@@ -509,41 +542,41 @@ var C = [
509
542
  })
510
543
  ]
511
544
  }),
512
- f === "operating" && /* @__PURE__ */ b("div", {
545
+ p === "operating" && /* @__PURE__ */ x("div", {
513
546
  className: "space-y-5",
514
- children: [/* @__PURE__ */ y(E, {
547
+ children: [/* @__PURE__ */ b(O, {
515
548
  label: "Auto-Accept Orders",
516
549
  description: "Automatically accept incoming orders without manual confirmation",
517
- checked: L.autoAcceptOrders,
518
- onChange: (e) => R((t) => ({
550
+ checked: B.autoAcceptOrders,
551
+ onChange: (e) => V((t) => ({
519
552
  ...t,
520
553
  autoAcceptOrders: e
521
554
  }))
522
- }), /* @__PURE__ */ b("div", {
555
+ }), /* @__PURE__ */ x("div", {
523
556
  className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
524
557
  children: [
525
- /* @__PURE__ */ y(T, {
558
+ /* @__PURE__ */ b(D, {
526
559
  label: "Default Preparation Time (min)",
527
- value: L.preparationTime,
528
- onChange: (e) => R((t) => ({
560
+ value: B.preparationTime,
561
+ onChange: (e) => V((t) => ({
529
562
  ...t,
530
563
  preparationTime: parseInt(e) || 0
531
564
  })),
532
565
  type: "number"
533
566
  }),
534
- /* @__PURE__ */ y(T, {
567
+ /* @__PURE__ */ b(D, {
535
568
  label: "Max Concurrent Orders",
536
- value: L.maxConcurrentOrders,
537
- onChange: (e) => R((t) => ({
569
+ value: B.maxConcurrentOrders,
570
+ onChange: (e) => V((t) => ({
538
571
  ...t,
539
572
  maxConcurrentOrders: parseInt(e) || 0
540
573
  })),
541
574
  type: "number"
542
575
  }),
543
- /* @__PURE__ */ y(T, {
576
+ /* @__PURE__ */ b(D, {
544
577
  label: "Advance Booking (days)",
545
- value: L.advanceBookingDays,
546
- onChange: (e) => R((t) => ({
578
+ value: B.advanceBookingDays,
579
+ onChange: (e) => V((t) => ({
547
580
  ...t,
548
581
  advanceBookingDays: parseInt(e) || 0
549
582
  })),
@@ -552,212 +585,212 @@ var C = [
552
585
  ]
553
586
  })]
554
587
  }),
555
- f === "policies" && /* @__PURE__ */ b("div", {
588
+ p === "policies" && /* @__PURE__ */ x("div", {
556
589
  className: "space-y-5",
557
590
  children: [
558
- /* @__PURE__ */ y(T, {
591
+ /* @__PURE__ */ b(D, {
559
592
  label: "Return Policy",
560
- value: z.returnPolicy,
593
+ value: H.returnPolicy,
561
594
  onChange: Z("returnPolicy"),
562
595
  type: "textarea",
563
596
  rows: 4
564
597
  }),
565
- /* @__PURE__ */ y(T, {
598
+ /* @__PURE__ */ b(D, {
566
599
  label: "Cancellation Policy",
567
- value: z.cancellationPolicy,
600
+ value: H.cancellationPolicy,
568
601
  onChange: Z("cancellationPolicy"),
569
602
  type: "textarea",
570
603
  rows: 4
571
604
  }),
572
- /* @__PURE__ */ y(T, {
605
+ /* @__PURE__ */ b(D, {
573
606
  label: "Privacy Policy",
574
- value: z.privacyPolicy,
607
+ value: H.privacyPolicy,
575
608
  onChange: Z("privacyPolicy"),
576
609
  type: "textarea",
577
610
  rows: 4
578
611
  }),
579
- /* @__PURE__ */ y(T, {
612
+ /* @__PURE__ */ b(D, {
580
613
  label: "Terms of Service",
581
- value: z.termsOfService,
614
+ value: H.termsOfService,
582
615
  onChange: Z("termsOfService"),
583
616
  type: "textarea",
584
617
  rows: 4
585
618
  })
586
619
  ]
587
620
  }),
588
- f === "notifications" && /* @__PURE__ */ b("div", {
621
+ p === "notifications" && /* @__PURE__ */ x("div", {
589
622
  className: "space-y-1 divide-y divide-border",
590
623
  children: [
591
- /* @__PURE__ */ y("h3", {
624
+ /* @__PURE__ */ b("h3", {
592
625
  className: "text-sm font-semibold text-text-primary pb-2",
593
626
  children: "New Orders"
594
627
  }),
595
- /* @__PURE__ */ y(E, {
628
+ /* @__PURE__ */ b(O, {
596
629
  label: "Email Notification",
597
630
  description: "Receive email for new orders",
598
- checked: V.newOrderEmail,
631
+ checked: W.newOrderEmail,
599
632
  onChange: Q("newOrderEmail")
600
633
  }),
601
- /* @__PURE__ */ y(E, {
634
+ /* @__PURE__ */ b(O, {
602
635
  label: "SMS Notification",
603
636
  description: "Receive SMS for new orders",
604
- checked: V.newOrderSms,
637
+ checked: W.newOrderSms,
605
638
  onChange: Q("newOrderSms")
606
639
  }),
607
- /* @__PURE__ */ y(E, {
640
+ /* @__PURE__ */ b(O, {
608
641
  label: "Push Notification",
609
642
  description: "Receive push notifications for new orders",
610
- checked: V.newOrderPush,
643
+ checked: W.newOrderPush,
611
644
  onChange: Q("newOrderPush")
612
645
  }),
613
- /* @__PURE__ */ y("h3", {
646
+ /* @__PURE__ */ b("h3", {
614
647
  className: "text-sm font-semibold text-text-primary pt-4 pb-2",
615
648
  children: "Order Updates"
616
649
  }),
617
- /* @__PURE__ */ y(E, {
650
+ /* @__PURE__ */ b(O, {
618
651
  label: "Email Updates",
619
652
  description: "Get email when order status changes",
620
- checked: V.orderUpdateEmail,
653
+ checked: W.orderUpdateEmail,
621
654
  onChange: Q("orderUpdateEmail")
622
655
  }),
623
- /* @__PURE__ */ y(E, {
656
+ /* @__PURE__ */ b(O, {
624
657
  label: "Push Updates",
625
658
  description: "Get push notifications for order updates",
626
- checked: V.orderUpdatePush,
659
+ checked: W.orderUpdatePush,
627
660
  onChange: Q("orderUpdatePush")
628
661
  }),
629
- /* @__PURE__ */ y("h3", {
662
+ /* @__PURE__ */ b("h3", {
630
663
  className: "text-sm font-semibold text-text-primary pt-4 pb-2",
631
664
  children: "Reports & Alerts"
632
665
  }),
633
- /* @__PURE__ */ y(E, {
666
+ /* @__PURE__ */ b(O, {
634
667
  label: "Daily Summary",
635
668
  description: "Receive daily business summary email",
636
- checked: V.dailySummaryEmail,
669
+ checked: W.dailySummaryEmail,
637
670
  onChange: Q("dailySummaryEmail")
638
671
  }),
639
- /* @__PURE__ */ y(E, {
672
+ /* @__PURE__ */ b(O, {
640
673
  label: "Weekly Summary",
641
674
  description: "Receive weekly performance report",
642
- checked: V.weeklySummaryEmail,
675
+ checked: W.weeklySummaryEmail,
643
676
  onChange: Q("weeklySummaryEmail")
644
677
  }),
645
- /* @__PURE__ */ y(E, {
678
+ /* @__PURE__ */ b(O, {
646
679
  label: "Low Stock Alert",
647
680
  description: "Get alerted when items are low on stock",
648
- checked: V.lowStockAlert,
681
+ checked: W.lowStockAlert,
649
682
  onChange: Q("lowStockAlert")
650
683
  }),
651
- /* @__PURE__ */ y(E, {
684
+ /* @__PURE__ */ b(O, {
652
685
  label: "Review Notifications",
653
686
  description: "Get notified for new customer reviews",
654
- checked: V.reviewNotification,
687
+ checked: W.reviewNotification,
655
688
  onChange: Q("reviewNotification")
656
689
  }),
657
- /* @__PURE__ */ y(E, {
690
+ /* @__PURE__ */ b(O, {
658
691
  label: "Marketing Emails",
659
692
  description: "Receive tips and promotional content",
660
- checked: V.marketingEmails,
693
+ checked: W.marketingEmails,
661
694
  onChange: Q("marketingEmails")
662
695
  })
663
696
  ]
664
697
  }),
665
- f === "integration" && /* @__PURE__ */ b("div", {
698
+ p === "integration" && /* @__PURE__ */ x("div", {
666
699
  className: "space-y-5",
667
700
  children: [
668
- /* @__PURE__ */ y("h3", {
701
+ /* @__PURE__ */ b("h3", {
669
702
  className: "text-sm font-semibold text-text-primary",
670
703
  children: "Payment Gateway"
671
704
  }),
672
- /* @__PURE__ */ b("div", {
705
+ /* @__PURE__ */ x("div", {
673
706
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
674
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
707
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
675
708
  className: "block text-sm font-medium text-text-primary mb-1.5",
676
709
  children: "Provider"
677
- }), /* @__PURE__ */ b("select", {
678
- value: U.paymentGateway,
710
+ }), /* @__PURE__ */ x("select", {
711
+ value: G.paymentGateway,
679
712
  onChange: (e) => $("paymentGateway")(e.target.value),
680
713
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
681
714
  children: [
682
- /* @__PURE__ */ y("option", {
715
+ /* @__PURE__ */ b("option", {
683
716
  value: "razorpay",
684
717
  children: "Razorpay"
685
718
  }),
686
- /* @__PURE__ */ y("option", {
719
+ /* @__PURE__ */ b("option", {
687
720
  value: "paytm",
688
721
  children: "Paytm"
689
722
  }),
690
- /* @__PURE__ */ y("option", {
723
+ /* @__PURE__ */ b("option", {
691
724
  value: "stripe",
692
725
  children: "Stripe"
693
726
  }),
694
- /* @__PURE__ */ y("option", {
727
+ /* @__PURE__ */ b("option", {
695
728
  value: "phonepe",
696
729
  children: "PhonePe"
697
730
  })
698
731
  ]
699
- })] }), /* @__PURE__ */ y(T, {
732
+ })] }), /* @__PURE__ */ b(D, {
700
733
  label: "API Key",
701
- value: U.paymentGatewayKey,
734
+ value: G.paymentGatewayKey,
702
735
  onChange: $("paymentGatewayKey"),
703
736
  placeholder: "Enter API key",
704
737
  hint: "Keep this secret"
705
738
  })]
706
739
  }),
707
- /* @__PURE__ */ y("h3", {
740
+ /* @__PURE__ */ b("h3", {
708
741
  className: "text-sm font-semibold text-text-primary pt-2",
709
742
  children: "SMS Provider"
710
743
  }),
711
- /* @__PURE__ */ b("div", {
744
+ /* @__PURE__ */ x("div", {
712
745
  className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
713
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
746
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
714
747
  className: "block text-sm font-medium text-text-primary mb-1.5",
715
748
  children: "Provider"
716
- }), /* @__PURE__ */ b("select", {
717
- value: U.smsProvider,
749
+ }), /* @__PURE__ */ x("select", {
750
+ value: G.smsProvider,
718
751
  onChange: (e) => $("smsProvider")(e.target.value),
719
752
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
720
753
  children: [
721
- /* @__PURE__ */ y("option", {
754
+ /* @__PURE__ */ b("option", {
722
755
  value: "twilio",
723
756
  children: "Twilio"
724
757
  }),
725
- /* @__PURE__ */ y("option", {
758
+ /* @__PURE__ */ b("option", {
726
759
  value: "msg91",
727
760
  children: "MSG91"
728
761
  }),
729
- /* @__PURE__ */ y("option", {
762
+ /* @__PURE__ */ b("option", {
730
763
  value: "textlocal",
731
764
  children: "Textlocal"
732
765
  })
733
766
  ]
734
- })] }), /* @__PURE__ */ y(T, {
767
+ })] }), /* @__PURE__ */ b(D, {
735
768
  label: "SMS API Key",
736
- value: U.smsApiKey,
769
+ value: G.smsApiKey,
737
770
  onChange: $("smsApiKey"),
738
771
  placeholder: "Enter SMS API key"
739
772
  })]
740
773
  }),
741
- /* @__PURE__ */ y("h3", {
774
+ /* @__PURE__ */ b("h3", {
742
775
  className: "text-sm font-semibold text-text-primary pt-2",
743
776
  children: "Analytics"
744
777
  }),
745
- /* @__PURE__ */ y(T, {
778
+ /* @__PURE__ */ b(D, {
746
779
  label: "Google Analytics ID",
747
- value: U.analyticsId,
780
+ value: G.analyticsId,
748
781
  onChange: $("analyticsId"),
749
782
  placeholder: "GA-XXXXXXXXX"
750
783
  })
751
784
  ]
752
785
  }),
753
- /* @__PURE__ */ y("div", {
786
+ /* @__PURE__ */ b("div", {
754
787
  className: "flex justify-end mt-8 pt-6 border-t border-border-subtle",
755
- children: /* @__PURE__ */ y("button", {
788
+ children: /* @__PURE__ */ b("button", {
756
789
  type: "button",
757
790
  onClick: q,
758
- disabled: m,
759
- className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors", _ ? "bg-status-success-bg-subtle text-status-success-text" : m ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
760
- children: m ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : _ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), "Save Settings"] })
791
+ disabled: _,
792
+ className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors", v ? "bg-status-success-bg-subtle text-status-success-text" : _ ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
793
+ children: _ ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : v ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Save Settings"] })
761
794
  })
762
795
  })
763
796
  ]
@@ -766,16 +799,16 @@ var C = [
766
799
  ]
767
800
  })
768
801
  ]
769
- }) : /* @__PURE__ */ y(n, {
802
+ }) : /* @__PURE__ */ b(n, {
770
803
  title: "Business Settings",
771
804
  description: "Manage your business profile and configuration",
772
- children: /* @__PURE__ */ y(r, {
805
+ children: /* @__PURE__ */ b(r, {
773
806
  illustration: "empty-generic",
774
807
  title: "Create your cart first",
775
808
  description: "You don't have a service provider yet. Set up your cart before configuring its business settings.",
776
- action: /* @__PURE__ */ y("button", {
809
+ action: /* @__PURE__ */ b("button", {
777
810
  type: "button",
778
- onClick: () => l("/cart-owner/service-config"),
811
+ onClick: () => u("/cart-owner/service-config"),
779
812
  className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
780
813
  children: "Set up your cart"
781
814
  })
@@ -783,6 +816,6 @@ var C = [
783
816
  });
784
817
  };
785
818
  //#endregion
786
- export { O as BusinessSettingsPage };
819
+ export { k as BusinessSettingsPage };
787
820
 
788
821
  //# sourceMappingURL=BusinessSettingsPage.js.map