@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

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